Fixed: Select fields now selects on pressing the enter key (#5576)

Now while pressing the `Enter` button, the select field selects the
relevant option.

- Added a `handleKeyDown` function to set the `persistField` with the
selected option.
- Added an `onKeyDown` event on `DropdownMenuSearchInput` component, to
trigger `handleKeyDown` when `Enter` is pressed.
- Fixes: #5556

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Shashank Vishwakarma
2024-06-11 16:29:31 +05:30
committed by GitHub
parent 8a88bf41dd
commit 07d07ff876
3 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,3 @@
export enum SelectFieldHotkeyScope {
SelectField = 'select-field',
}