-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: focus issue in filterable multiselect #16840
fix: focus issue in filterable multiselect #16840
Conversation
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
My only concerned over here is , is this the intended behaviour - when the filterable multiselect is opened clicking outside first closes the menu , and focus remains on input field to type something and then clicking outside again clears the focus. |
@riddhybansal , clicking the (x) button isn't clearing the text box or clearing the selected options, is that intended behaviour?? Please correct me if I've missed something Screen.Recording.2024-06-21.at.4.39.54.PM.mov |
I'm also seeing the same issue as @Gururajj77 the focus is removed when you click outside, but the clear button doesn't do anything. (we need a test for this) |
Also looks like the focus doesn't go away when we are tabbing out from the
Good catch. In the 1.59.0 is working as expected the close icon. We should also write tests for those two scenarios, to avoid any changes that might affect that in the future. |
packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx
Outdated
Show resolved
Hide resolved
3636b9f
* fix: focus issue in filterable multiselect * fix: added test cases and focus fixes * Update FilterableMultiSelect-test.js * Update FilterableMultiSelect-test.js * Update MultiSelect.stories.js * Update packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx --------- Co-authored-by: Taylor Jones <[email protected]>
Closes #16830
Focus issue in filterable multiselect
Changelog
New
Testing / Reviewing
Test filterable multiselect , it should work as intended.
Using the Storybook Filterable, if you click in the select and type opt ... then try clicking on the (x) clear button, it should work , and it should lose focus after clicking outside.
Please verify this PR does not create another issue that has been closed already #16145