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

Be able to modify autoscroll behaviour when item added #232

Open
Migarl opened this issue Feb 19, 2022 · 0 comments
Open

Be able to modify autoscroll behaviour when item added #232

Migarl opened this issue Feb 19, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Migarl
Copy link

Migarl commented Feb 19, 2022

Hey there!

Current behaviour
I add new items to the timeline (vertical mode) dynamically, so I set allowDynamicUpdate to true. Each time my state changes (a new item was added) the timeline automatically scrolls to the last item (the very bottom).

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The problem is that this behavior cannot be changed (or did I missed something?)

Describe the solution you'd like
A clear and concise description of what you want to happen.

I want to be able to change this behavior, because in my case new items will be added to the top and it is confusing when the timeline scrolls down to the oldest item.

So a solution to set scroll direction on updated items would be nice. Maybe something like top, bottom, none?
none means the timeline shouldn't scroll when a new item added.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I tried to set activeItemIndex to 0 when a new item was added, nevertheless the timeline is scrolling to the bottom.

So an alternative could be to prioritize activeItemIndex to always scroll to selected item.

Additional context
Add any other context or screenshots about the feature request here.

I modified vertical basic example to add a new item after three seconds for better understanding (https://github.com/Migarl/react-chrono)

Hope you understand my request.

Thank you for your great work!

@prabhuignoto prabhuignoto self-assigned this Feb 19, 2022
@prabhuignoto prabhuignoto added the enhancement New feature or request label Feb 20, 2022
@prabhuignoto prabhuignoto added this to the 1.15 milestone Feb 23, 2022
@prabhuignoto prabhuignoto removed this from the 1.15 milestone Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants