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 disableMultipleSelection #286

Merged
merged 1 commit into from
Sep 15, 2020
Merged

Conversation

dtassone
Copy link
Member

No description provided.

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 would help to add a description of the issue for the future version of ourselves that will blame the line. Should we add a test case?

@@ -110,10 +111,12 @@ export const useSelection = (

const selectRows = React.useCallback(
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered using useEventCallback instead of useCallback?
It will remove the need for the new optionsRef.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we can do if you want

Copy link
Member

Choose a reason for hiding this comment

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

No strong preferences. If you find it easier in the future or solving bugs, I think that it will be great to consider it.

@oliviertassinari oliviertassinari changed the title fix disableMultipleSelection [DataGrid] Fix disableMultipleSelection Sep 14, 2020
@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work labels Sep 14, 2020
@dtassone dtassone merged commit fa1fad7 into mui:master Sep 15, 2020
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.

2 participants