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] Fix shift+space keyboard regression to select row #897

Merged
merged 8 commits into from
Jan 22, 2021

Conversation

dtassone
Copy link
Member

@dtassone dtassone commented Jan 22, 2021

Fix #889

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a regression and not obvious to spot, I think that it should have a test case (it's because it didn't have one that we broke it)

@oliviertassinari oliviertassinari changed the title [DataGrid] fix #889 shift+space to select row [DataGrid] Fix shift+space keyboard regression to select row Jan 22, 2021
@@ -1,10 +1,10 @@
export const MULTIPLE_SELECTION_KEYS = ['Meta', 'Control'];
export const isMultipleKey = (code: string): boolean => MULTIPLE_SELECTION_KEYS.indexOf(code) > -1;
export const isTabKey = (code: string): boolean => code === 'Tab';
export const isSpaceKey = (code: string): boolean => code === 'Space';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me some time to find where was the fix in the diff, spotted. Space => ' ' :)

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Jan 22, 2021
@dtassone dtassone merged commit f1c2c85 into mui:master Jan 22, 2021
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Keyboard shortcut to select a row (Shift+Space) not working
3 participants