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] Improve row selection propagation trigger #15184

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Selection Related to the data grid Selection feature labels Oct 30, 2024
@mui-bot
Copy link

mui-bot commented Oct 30, 2024

Deploy preview: https://deploy-preview-15184--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 5c0cbd4

@MBilalShafi MBilalShafi marked this pull request as ready for review November 1, 2024 10:56
@MBilalShafi MBilalShafi requested a review from a team November 1, 2024 10:57
const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);

// We clone the existing object to avoid mutating the same object returned by the selector to others part of the project
const selectionLookup = { ...selectedIdsLookupSelector(apiRef) };

const isNonExistent = (id: GridRowId) => {
if (props.filterMode === 'server') {
return !rowsLookup[id];
Copy link
Member Author

Choose a reason for hiding this comment

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

There is no filteredRowsLookup when filterMode='server'

@shubhsk88
Copy link

Is there any idea when this PR can be merged? This seems to keep happening to me whenever I try to select the checkbox in parent/descendant, and then it causes the table to rerender infinitely. This is blocking our workflow. Would love to get an estimation around this

@KenanYusuf
Copy link
Contributor

@MBilalShafi is it expected that in this demo, selecting the child rows cause the group to collapse?

Screen.Recording.2024-11-04.at.14.56.14.mov

@MBilalShafi
Copy link
Member Author

@KenanYusuf It's a problem with the demo itself and not the Data Grid, here's some context on why it happens: #7771 (comment)

Here's a fixed version: https://codesandbox.io/p/sandbox/mui-mui-x-x-data-grid-forked-cgpss2

@MBilalShafi MBilalShafi merged commit 431eccc into mui:master Nov 4, 2024
24 checks passed
@MBilalShafi MBilalShafi deleted the fix/row-selection-issues branch November 4, 2024 17:36
MBilalShafi added a commit to MBilalShafi/mui-x that referenced this pull request Nov 5, 2024
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 5, 2024

It looks like this PR broke master:

SCR-20241105-lktd

I noticed this on #15271.

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! feature: Selection Related to the data grid Selection feature
Projects
None yet
5 participants