-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixed incorrect row highlight behavior #6189
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
Fixed incorrect row highlight behavior #6189
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.
This looks good to me wondering why it was set too 0
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.
In the DataTable/Clickable story if I only use the keyboard to navigate I can't get to any of the options (open the story, press tab to get focus on the DataTable, and then try to navigate through options with the up and down arrows). Only after clicking an option am I able to use the keyboard to navigate to other options.
good catch thinking that was the reasoning behind the |
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!
What does this PR do?
Fixes incorrect highlighting of the first row in a table after selecting another item, clicking outside of the table, and trying to select a disabled row. Looked into the "pinnable" highlight behavior noted in the issue but could be a separate issue (not sure of the expected behavior vs. actual behavior).
Where should the reviewer start?
Body.js
What testing has been done on this PR?
Manual testing
How should this be manually tested?
Use the onSelect story in Storybook
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
#6165
Screenshots (if appropriate)
Video Showing Issue
Screen.Recording.2022-06-16.at.12.44.55.PM.mov
Video Showing Fix
Screen.Recording.2022-06-16.at.12.33.45.PM.mov
Do the grommet docs need to be updated?
No
Should this PR be mentioned in the release notes?
Yes
Is this change backwards compatible or is it a breaking change?
Compatible