diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents.ts b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents.ts index c4ce8f03a7..8e41832d22 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents.ts @@ -18,8 +18,8 @@ export const useRegisterInputEvents = ({ inputRef: React.RefObject; copyRef?: React.RefObject; inputValue: T; - onEscape: (inputValue: T) => void; - onEnter: (inputValue: T) => void; + onEscape?: (inputValue: T) => void; + onEnter?: (inputValue: T) => void; onTab?: (inputValue: T) => void; onShiftTab?: (inputValue: T) => void; onClickOutside?: (event: MouseEvent | TouchEvent, inputValue: T) => void; diff --git a/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx index b932cbdc5f..1ca01f5b4f 100644 --- a/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx +++ b/packages/twenty-front/src/modules/ui/field/input/components/TextInput.tsx @@ -15,11 +15,11 @@ type TextInputProps = { placeholder?: string; autoFocus?: boolean; value: string; - onEnter: (newText: string) => void; - onEscape: (newText: string) => void; + onEnter?: (newText: string) => void; + onEscape?: (newText: string) => void; onTab?: (newText: string) => void; onShiftTab?: (newText: string) => void; - onClickOutside: (event: MouseEvent | TouchEvent, inputValue: string) => void; + onClickOutside?: (event: MouseEvent | TouchEvent, inputValue: string) => void; hotkeyScope: string; onChange?: (newText: string) => void; copyButton?: boolean;