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 in group card #2

Open
Lamgiaosu1805 opened this issue Mar 7, 2023 · 1 comment
Open

scroll in group card #2

Lamgiaosu1805 opened this issue Mar 7, 2023 · 1 comment

Comments

@Lamgiaosu1805
Copy link

Every time setState(), the group card is scrolled to the top

@Maksimka101
Copy link

Hello

I found out why is it happening

  • First of all, a new ScrollController is created for the ReorderFlex widget in the _AppFlowyBoardContent. We can store ScrollControllers for each group in a map
  • However this alone won't resolve the issue because ReorderFlex widget reads the scroll position of the nearest scrollable (here is the code) and sets it to the scroll controller. Consequently, the reorder flex of the group (the red ReorderFlex 1 on screenshot) reads the scroll position of the columns' reorder flex (the green ReorderFlex 2 on screenshot), leading to incorrect behavior. When I comment out the line from the referenced code and apply the initial fix, everything works correctly

What I'm asking is, what should I do regarding the second issue? Can I simply remove all the scroll position-related code from the didChangeDependencies method?

Screenshot 2024-01-26 at 16 14 58

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

No branches or pull requests

2 participants