-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix Select to load all options even when clear={true} #6285
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I looked into the tests you added and was getting the same issue where the tests were timing out. I tried switching from userEvent to fireEvent and that seemed to solve the issue. Occasionally I've run across some cases where userEvent doesn't work as expected or affects the timing, so sometimes fireEvent is needed instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just a couple polishing items.
Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>
What does this PR do?
clear
is used, all Select options still render (original issue filed)To Do:
User should be able to tab to the "Clear Selection" button if it is at the bottom.
In this video, I open the select with "space", use down arrow to move through the options, "enter" to select options", then "tab" to tab through the select options and get to "Clear Selection". I am using VoiceOver on Mac.
clear-bottom.mov
Where should the reviewer start?
SelectContainer
What testing has been done on this PR?
Using Clear story.
How should this be manually tested?
Use Clear story.
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
. (userEvent was causing timeout, used fireEvent)asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
Closes #6267
Screenshots (if appropriate)
Do the grommet docs need to be updated?
No.
Should this PR be mentioned in the release notes?
Yes. Fixed
clear
bug where not all Select options would render.Is this change backwards compatible or is it a breaking change?
Backwards compatible.