Skip to content

[DataGrid] Fix column spanning jump on scroll#17759

Merged
cherniavskii merged 1 commit intomui:masterfrom
cherniavskii:fix-column-spanning-jump
May 9, 2025
Merged

[DataGrid] Fix column spanning jump on scroll#17759
cherniavskii merged 1 commit intomui:masterfrom
cherniavskii:fix-column-spanning-jump

Conversation

@cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented May 8, 2025

@cherniavskii cherniavskii added type: bug It doesn't behave as expected. scope: data grid Changes related to the data grid. 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 cherry-picked to master after merge. 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
@github-actions
Copy link
Contributor

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 cherry-picked to master after merge. scope: data grid Changes related to the data grid. type: bug It doesn't behave as expected. 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