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

[DataGridPro] Fix selection propagation issue on initialization #15461

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

MBilalShafi
Copy link
Member

Fixes #15382

@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 needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels Nov 18, 2024
@mui-bot
Copy link

mui-bot commented Nov 18, 2024

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

Generated by 🚫 dangerJS against 41d5adf

@MBilalShafi MBilalShafi requested a review from a team November 18, 2024 09:26
@MBilalShafi MBilalShafi changed the title [DataGridPro] Fix selection propation issue on initialization [DataGridPro] Fix selection propagation issue on initialization Nov 18, 2024
@MBilalShafi MBilalShafi enabled auto-merge (squash) November 18, 2024 09:29
@@ -453,9 +453,6 @@ export const useGridRowSelection = (
const isFirstRender = React.useRef(true);
const removeOutdatedSelection = React.useCallback(
(sortModelUpdated = false) => {
if (isFirstRender.current) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isFirstRender is not used anymore. it can be cleared from the file

with that
how does this affect #14909
since that was the only change added to address that issue

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, cleaned up isFirstRender.

how does this affect #14909

#15184 removed the root cause for #14909, isFirstRender ref was not needed anymore for that fix.

@MBilalShafi MBilalShafi merged commit 14f1f78 into mui:master Nov 25, 2024
18 checks passed
Copy link

Cherry-pick PRs will be created targeting branches: v7.x

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 needs cherry-pick The PR should be cherry-picked to master after merge v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Bug when initializing selection with row grouping and rowSelectionPropagation
3 participants