Skip to content

Commit

Permalink
Multi item input hotkeys fixes (#9453)
Browse files Browse the repository at this point in the history
- Follow-up on #9442
- Fixed multi item input field on escape
  • Loading branch information
lucasbordeau authored Jan 8, 2025
1 parent aa0d854 commit 428572a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export const MultiItemFieldInput = <T,>({
})
: undefined
}
onEscape={handleDropdownClose}
onChange={(event) =>
handleOnChange(
turnIntoEmptyStringIfWhitespacesOnly(event.target.value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ export const DateInput = ({
closeDropdownMonthSelect();
closeDropdown();

onEnter?.(internalValue);
onEnter(internalValue);
};

const handleEscape = () => {
closeDropdownYearSelect();
closeDropdownMonthSelect();
closeDropdown();

onEscape?.(internalValue);
onEscape(internalValue);
};

const handleClickOutside = (event: MouseEvent | TouchEvent) => {
Expand Down

0 comments on commit 428572a

Please sign in to comment.