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

Scroll jumps when auto-fitting columns after data state change #4466

Open
mbechev opened this issue Nov 25, 2024 · 0 comments
Open

Scroll jumps when auto-fitting columns after data state change #4466

mbechev opened this issue Nov 25, 2024 · 0 comments

Comments

@mbechev
Copy link
Contributor

mbechev commented Nov 25, 2024

Description

The horizontal scroll of the Grid jumps when auto-fitting the columns ondataStateChange event.

Steps To Reproduce

  1. Scroll the Grid horizontally.
  2. Sort the last column.
  3. The Grid is scrolled unexpectedly
    https://stackblitz.com/edit/angular-p8jrqm

Expected Behavior

The Grid scrolling position should be preserved.

Additional Considerations

When sorting is applied, the values in cells are changed making cells with shorter widths get bigger (or the opposite) and hence changing the horizontal scroll. In this scenario, the new scroll position that should reflect the previous one might be unknown since the cell can contain different values in length which will change the horizontal scroll dimensions. In this case, resetting the width to its initial position could also be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants