Fixed date input fields (#9442)

- Fixed date input fields : proper hotkey management, like other fields
- Removed DropdownUnmountEffect which was causing many bugs.
This commit is contained in:
Lucas Bordeau
2025-01-08 10:43:49 +01:00
committed by GitHub
parent 3198748401
commit 00a9646d68
7 changed files with 44 additions and 63 deletions

View File

@ -24,7 +24,7 @@ export const DateFieldInput = ({
onClear,
onSubmit,
}: DateFieldInputProps) => {
const { fieldValue, setDraftValue } = useDateField();
const { fieldValue, setDraftValue, hotkeyScope } = useDateField();
const persistField = usePersistField();
@ -77,6 +77,7 @@ export const DateFieldInput = ({
onChange={handleChange}
onClear={handleClear}
onSubmit={handleSubmit}
hotkeyScope={hotkeyScope}
/>
);
};

View File

@ -26,7 +26,7 @@ export const DateTimeFieldInput = ({
onClear,
onSubmit,
}: DateTimeFieldInputProps) => {
const { fieldValue, setDraftValue } = useDateTimeField();
const { fieldValue, setDraftValue, hotkeyScope } = useDateTimeField();
const persistField = usePersistField();
@ -80,6 +80,7 @@ export const DateTimeFieldInput = ({
isDateTimeInput
onClear={handleClear}
onSubmit={handleSubmit}
hotkeyScope={hotkeyScope}
/>
);
};