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

Preventing scrolling to last visible child when expansion behaviour is none #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

busslina
Copy link

@busslina busslina commented Oct 14, 2023

On handleAddItemsEvent and handleInsertItemsEvent events

… none

On handleAddItemsEvent and handleInsertItemsEvent events
@busslina busslina changed the title Preventing scrolling to las visible child when expansion behaviour is none Preventing scrolling to last visible child when expansion behaviour is none Oct 14, 2023
@busslina
Copy link
Author

Now I can achieve my desired behavior:

Video_2023_10_14-1.webm

Now it really snaps to top. I use none and manipulate the controller by myself.

With the ...snapToTop it was scrolling down, then up.

With all the respect this lib is a mess in scrolling behaviour...

@jawwad-hassan89
Copy link
Contributor

Thanks for pointing out this issue, will look into it this weekend.

@jawwad-hassan89 jawwad-hassan89 mentioned this pull request Oct 17, 2023
@busslina
Copy link
Author

This is a easy patch. But sure you can get resolve it better although you know all the code design

jawwad-hassan89 added a commit to jawwad-hassan89/animated_tree_view that referenced this pull request Nov 5, 2023
…ur to scroll to latest node on addition or insertion
@jawwad-hassan89
Copy link
Contributor

jawwad-hassan89 commented Nov 5, 2023

I have fixed this issue by adding a new boolean flag focusToNewNode. By setting the flag to false, the scrolling to the last child is disabled.
As the issue you reported is not directly related to the expansion behaviour, and the disabling the sccrollingToLastChild might not be desirable by all the users, so it made sense to separate out this functionality.

Pull request 32 awaiting approval

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

Successfully merging this pull request may close these issues.

None yet

2 participants