In RAC, on Esc
click list box options are getting cleared how can i avoid this.
#7223
Replies: 2 comments 6 replies
-
Can you provide an example? I'm not sure what "my component" is, and we'll need to determine if we missed a behavior that should be controllable. https://react-spectrum.adobe.com/react-aria/ComboBox.html#combobox If I select an option in the first example, then open the popup by deleting a letter, it'll cancel the change and the selection remains. https://react-spectrum.adobe.com/react-aria/ListBox.html Esc clears the selection when focus is inside the ListBox https://react-spectrum.adobe.com/react-aria/Menu.html#multiple Escape closes the menu and does not de-select |
Beta Was this translation helpful? Give feedback.
-
You can refer this codesandbox -> https://codesandbox.io/p/sandbox/7ljm5l?file=%2Fsrc%2FApp.js ,In the console, when I press 'Esc,' all my selected items are getting cleared, resulting in an empty array on selection change. However, I want to prevent this behavior so that pressing 'Esc' doesn't clear the selected items. How can I achieve this? |
Beta Was this translation helpful? Give feedback.
-
Im using react aria components 1.3.3 version. In my component when i click
ESC
after opening the listbox my selected items are getting cleared how can i stop this?Beta Was this translation helpful? Give feedback.
All reactions