= {
- id: event.id,
- [event.field]: newValue,
- };
- await updateEvent(partialEvent);
+ await updateCustomField(event.id, event.field, newValue);
setLoading(false);
onClose();
};
@@ -43,6 +41,7 @@ export default function EditModal(props: EditModalProps) {
placeholder={`Add value for ${fieldLabel} field`}
defaultValue={event.fieldValue}
isDisabled={loading}
+ resize='none'
/>
-
{`/ontime/load/id "${event.id}"`}
diff --git a/apps/client/src/features/rundown/event-editor/composite/EventEditorUser.tsx b/apps/client/src/features/rundown/event-editor/composite/EventEditorUser.tsx
deleted file mode 100644
index db3725ad0..000000000
--- a/apps/client/src/features/rundown/event-editor/composite/EventEditorUser.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { UserFields } from 'ontime-types';
-
-import useUserFields from '../../../../common/hooks-query/useUserFields';
-import { EditorUpdateFields } from '../EventEditor';
-
-import EventTextArea from './EventTextArea';
-
-import style from '../EventEditor.module.scss';
-
-interface EventEditorUserProps {
- userFields: UserFields;
- handleSubmit: (field: EditorUpdateFields, value: string) => void;
-}
-
-export default function EventEditorUser(props: EventEditorUserProps) {
- const { userFields, handleSubmit } = props;
- const { data } = useUserFields();
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/client/src/features/rundown/event-editor/composite/EventTextArea.tsx b/apps/client/src/features/rundown/event-editor/composite/EventTextArea.tsx
index d356c06f5..64ad94888 100644
--- a/apps/client/src/features/rundown/event-editor/composite/EventTextArea.tsx
+++ b/apps/client/src/features/rundown/event-editor/composite/EventTextArea.tsx
@@ -1,28 +1,32 @@
-import { useCallback } from 'react';
+import { CSSProperties, useCallback } from 'react';
import { AutoTextArea } from '../../../../common/components/input/auto-text-area/AutoTextArea';
import useReactiveTextInput from '../../../../common/components/input/text-input/useReactiveTextInput';
+import { cx } from '../../../../common/utils/styleUtils';
import { EditorUpdateFields } from '../EventEditor';
import style from '../EventEditor.module.scss';
interface CountedTextAreaProps {
+ className?: string;
field: EditorUpdateFields;
label: string;
initialValue: string;
+ style?: CSSProperties;
submitHandler: (field: EditorUpdateFields, value: string) => void;
}
export default function EventTextArea(props: CountedTextAreaProps) {
- const { field, label, initialValue, submitHandler } = props;
+ const { className, field, label, initialValue, style: givenStyles, submitHandler } = props;
const submitCallback = useCallback((newValue: string) => submitHandler(field, newValue), [field, submitHandler]);
const { value, onChange, onBlur, onKeyDown } = useReactiveTextInput(initialValue, submitCallback);
+ const classes = cx([style.inputLabel, className]);
return (
-