mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-22 03:17:40 +03:00
refactor: make all event listeners optional
This commit is contained in:
parent
a304a8d51a
commit
7c3791a098
@ -18,8 +18,8 @@ export const useRegisterInputEvents = <T>({
|
||||
inputRef: React.RefObject<any>;
|
||||
copyRef?: React.RefObject<any>;
|
||||
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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user