Skip to content

[DataGrid] Fix column spanning jump on scroll #17759

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented May 8, 2025

@cherniavskii cherniavskii added type: bug A bug or unintended behavior in the components. scope: data grid Changes or issues related to the data grid product feature: Column spanning Related to the data grid Column spanning feature labels May 8, 2025
@mui-bot
Copy link

mui-bot commented May 8, 2025

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

Generated by 🚫 dangerJS against ccdc0bf

@cherniavskii cherniavskii requested a review from a team May 8, 2025 21:25
@cherniavskii cherniavskii added needs cherry-pick The PR should be auto-cherry-picked to a version branch after merge—add a version label as target v7.x labels May 8, 2025
@cherniavskii cherniavskii marked this pull request as ready for review May 8, 2025 21:25
let foundStableColumn = false;

// Keep checking columns until we find one that's not spanned in any visible row
while (!foundStableColumn && firstNonSpannedColumnToRender >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC firstNonSpannedColumnToRender is always >= 0

firstNonSpannedColumnToRender,
);

if (
Copy link
Contributor

@arminmeh arminmeh May 9, 2025

Choose a reason for hiding this comment

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

at certain scroll positions it seems that this code is called in intervals (don't think it is because of the changes made in this PR)

Screen.Recording.2025-05-09.at.14.42.59.mov

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch! Opened a separate PR for this one: #17779

Copy link
Member

@MBilalShafi MBilalShafi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for handling this 🙏

@cherniavskii cherniavskii merged commit 6fc6646 into mui:master May 9, 2025
33 checks passed
@cherniavskii cherniavskii deleted the fix-column-spanning-jump branch May 9, 2025 17:19
Copy link

github-actions bot commented May 9, 2025

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
feature: Column spanning Related to the data grid Column spanning feature needs cherry-pick The PR should be auto-cherry-picked to a version branch after merge—add a version label as target scope: data grid Changes or issues related to the data grid product type: bug A bug or unintended behavior in the components. v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Horizontal scroll with column spanning makes the cells jump
4 participants