Skip to content

Conversation

@texodus
Copy link
Member

@texodus texodus commented Dec 18, 2025

This PR fixes a regression introduced in #3047, which causes broken datagrid behavior after a sort in a certain condition, and adds a test.

Most View changes in perspective will reset scroll position, but this behavior feels "wrong" when e.g. a sort is applied by clicking on a column header. In #3047 we made such metadata-modifying operations capable of incrementally updating the column defs, but we neglected to account for the possibility that the first such update may not occur when the scroll position is (0. 0) (e.g. after a sort is applied).

@texodus texodus added the bug Concrete, reproducible bugs label Dec 18, 2025
@texodus texodus linked an issue Dec 18, 2025 that may be closed by this pull request
Signed-off-by: Andrew Stein <steinlink@gmail.com>
@texodus texodus force-pushed the fix-viewport-sorting branch from 90d9cf1 to 2af1bca Compare December 18, 2025 04:07
Copy link
Contributor

@timbess timbess left a comment

Choose a reason for hiding this comment

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

Looks good!

(x) => x !== "__ROW_PATH__" && x !== "__ID__",
);

const old_length = this._column_paths.length;
Copy link
Member Author

Choose a reason for hiding this comment

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

@texodus texodus merged commit 046a0ac into master Dec 18, 2025
16 checks passed
@texodus texodus deleted the fix-viewport-sorting branch December 18, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Concrete, reproducible bugs

Development

Successfully merging this pull request may close these issues.

Datagrid column header sort clicks broken after horizontal scroll

3 participants