diff --git a/apps/client/package.json b/apps/client/package.json index f92628264..8c213bbb8 100644 --- a/apps/client/package.json +++ b/apps/client/package.json @@ -1,6 +1,6 @@ { "name": "ontime-ui", - "version": "2.7.1", + "version": "2.7.2", "private": true, "dependencies": { "@chakra-ui/react": "^2.7.0", diff --git a/apps/client/src/features/event-editor/composite/CountedTextInput.tsx b/apps/client/src/features/event-editor/composite/CountedTextInput.tsx index a9261f94e..7c9ebf351 100644 --- a/apps/client/src/features/event-editor/composite/CountedTextInput.tsx +++ b/apps/client/src/features/event-editor/composite/CountedTextInput.tsx @@ -1,6 +1,5 @@ import { useCallback } from 'react'; import { Input, InputProps } from '@chakra-ui/react'; -import { sanitiseCue } from 'ontime-utils'; import useReactiveTextInput from '../../../common/components/input/text-input/useReactiveTextInput'; import { EditorUpdateFields } from '../EventEditor'; @@ -17,10 +16,7 @@ interface CountedTextInputProps extends InputProps { export default function CountedTextInput(props: CountedTextInputProps) { const { field, label, initialValue, submitHandler, maxLength } = props; - const submitCallback = useCallback( - (newValue: string) => submitHandler(field, sanitiseCue(newValue)), - [field, submitHandler], - ); + const submitCallback = useCallback((newValue: string) => submitHandler(field, newValue), [field, submitHandler]); const { value, onChange, onBlur, onKeyDown } = useReactiveTextInput(initialValue, submitCallback, { submitOnEnter: true, diff --git a/apps/client/src/features/event-editor/composite/EventEditorDataLeft.tsx b/apps/client/src/features/event-editor/composite/EventEditorDataLeft.tsx index d8cd01ac6..f0db20b3f 100644 --- a/apps/client/src/features/event-editor/composite/EventEditorDataLeft.tsx +++ b/apps/client/src/features/event-editor/composite/EventEditorDataLeft.tsx @@ -1,5 +1,6 @@ import { memo } from 'react'; import { Input } from '@chakra-ui/react'; +import { sanitiseCue } from 'ontime-utils'; import { type EditorUpdateFields } from '../EventEditor'; @@ -19,6 +20,10 @@ interface EventEditorLeftProps { const EventEditorDataLeft = (props: EventEditorLeftProps) => { const { eventId, cue, title, presenter, subtitle, handleSubmit } = props; + const cueSubmitHandler = (_field: string, newValue: string) => { + handleSubmit('cue', sanitiseCue(newValue)); + }; + return (
@@ -37,7 +42,7 @@ const EventEditorDataLeft = (props: EventEditorLeftProps) => { readOnly />
- +
diff --git a/apps/electron/package.json b/apps/electron/package.json index 9769b2edc..6ea2ac7dd 100644 --- a/apps/electron/package.json +++ b/apps/electron/package.json @@ -1,6 +1,6 @@ { "name": "ontime", - "version": "2.7.1", + "version": "2.7.2", "author": "Carlos Valente", "description": "Time keeping for live events", "repository": "https://github.com/cpvalente/ontime", diff --git a/apps/server/package.json b/apps/server/package.json index 5b0b6aacd..c43f35e5e 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -2,7 +2,7 @@ "name": "ontime-server", "type": "module", "main": "src/index.ts", - "version": "2.7.1", + "version": "2.7.2", "exports": "./src/index.js", "dependencies": { "body-parser": "^1.20.0", diff --git a/package.json b/package.json index 2fcead234..28fb90ca2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ontime", - "version": "2.7.1", + "version": "2.7.2", "description": "Time keeping for live events", "keywords": [ "lighdev",