Skip to content
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] Keyboard navigation broken on page > 0 #3074

Merged
merged 10 commits into from
Nov 3, 2021

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Nov 2, 2021

Introduced by #2994, was never released, I will merge it before the next release if no review 👍

The variable wording was approximate and I did not test enough.
rowCount was refering to the index of the last element of the page + 1

A few examples:

  • rows.length: 100, page: 0, pageSize: 10 => rowCount: 10
  • rows.length: 100, page: 1, pageSize: 10 => rowCount: 20
  • rows.length: 14, page: 1, pageSize: 10 => rowCount: 14

I will probably clean those methods later to add explicit comments on each instruction.
Because // we go to the current row, first col, or last col! is not very explicit to me.

@flaviendelangle flaviendelangle self-assigned this Nov 2, 2021
@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse labels Nov 2, 2021
@flaviendelangle flaviendelangle merged commit 6273301 into mui:next Nov 3, 2021
@flaviendelangle flaviendelangle deleted the keyboard-navigation branch November 3, 2021 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants