Multi item input hotkeys fixes (#9453)

- Follow-up on #9442
- Fixed multi item input field on escape
This commit is contained in:
Lucas Bordeau
2025-01-08 15:03:27 +01:00
committed by GitHub
parent aa0d8546a8
commit 428572ae99
2 changed files with 3 additions and 2 deletions

View File

@ -192,6 +192,7 @@ export const MultiItemFieldInput = <T,>({
}) })
: undefined : undefined
} }
onEscape={handleDropdownClose}
onChange={(event) => onChange={(event) =>
handleOnChange( handleOnChange(
turnIntoEmptyStringIfWhitespacesOnly(event.target.value), turnIntoEmptyStringIfWhitespacesOnly(event.target.value),

View File

@ -72,7 +72,7 @@ export const DateInput = ({
closeDropdownMonthSelect(); closeDropdownMonthSelect();
closeDropdown(); closeDropdown();
onEnter?.(internalValue); onEnter(internalValue);
}; };
const handleEscape = () => { const handleEscape = () => {
@ -80,7 +80,7 @@ export const DateInput = ({
closeDropdownMonthSelect(); closeDropdownMonthSelect();
closeDropdown(); closeDropdown();
onEscape?.(internalValue); onEscape(internalValue);
}; };
const handleClickOutside = (event: MouseEvent | TouchEvent) => { const handleClickOutside = (event: MouseEvent | TouchEvent) => {