-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] Allows to use keyboard navigation even with no rows #4302
Conversation
These are the results for the performance tests:
|
'.MuiDataGrid-virtualScroller', | ||
)! as HTMLElement; | ||
expect(virtualScroller.scrollLeft).to.equal(0); | ||
fireEvent.keyDown(document.activeElement!, { key: 'ArrowRight' }); |
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.
To able to re-enable the ESLint rule in the future.
fireEvent.keyDown(document.activeElement!, { key: 'ArrowRight' }); | |
fireEvent.keyDown(getColumnHeaderCell(0), { key: 'ArrowRight' }); |
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.
@m4theushw are you talking about the following line?
// @ts-ignore Remove once the test utils are typed
The file is full of those document.activeElement!
should I remove them?
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.
I merged because it's not related to the bug. If moving from document.activeElement
to getter methods, I will do a distinct PR cleaning the all file
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.
I was talking about
/* eslint-disable material-ui/disallow-active-element-as-key-event-target */ |
It's good to not use document.activeElement
in new tests. In the future there will be less tests to change.
The file is full of those document.activeElement! should I remove them?
The remaining ones can be done later since it's not the purpose of this PR.
Fix the following bug: #4280 (comment)