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

Vertical scrolling position is lost when column width changes with proportional row height #451

Open
dvdanielamoitzi opened this issue Jun 28, 2021 · 1 comment

Comments

@dvdanielamoitzi
Copy link

In a current application we have the use-case in lineup that the row height depends on the width of a specific column.
When you change the width of this column, the height of the rows change proportionally to it.
The problem which now arises is that when the user scrolls down, let's say to rank 50, and changes the width of this column, lineup scrolls somewhere else and the original position (rank 50 in this case) is lost (see attached video). This happens because the row height changes.
lineup-scrolling-problem

What I would expect is, that the position in the ranking stays the same which means after changing the width of the column, rank 50 should still be the first element I see.

To illustrate the problem I created two code pens:

https://codepen.io/dvdanielamoitzi/pen/qBmBBaa
The first one is a very simplified example which shows the above described behaviour on a categorical column (Cat2)

https://codepen.io/dvdanielamoitzi/pen/xxqvxQW
The second example shows the same problem, but includes our custom image renderer (Column Cat2).

What I tried so far was to listen to the "EVENT_WIDTH_CHANGED" event on the column and call "jumpToNearest" from there.
This approach does not work and I suppose this is because the event is fired before lineup calculated the new row height.

@thinkh
Copy link
Member

thinkh commented Jun 28, 2021

@sgratzl Please have a look into this. Do you have an idea how to fix the vertical scrolling either by using a different event, or by changing the library code?

@sgratzl sgratzl removed their assignment Aug 28, 2021
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

3 participants