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
Potential update issues (updated
hook, $nextTick
)
#34
Comments
Ok, right it may cause some issues, did you see some troubles with that ? |
I personally did not happen to. |
Ok, we can setup it on nextTick ofc |
I have this issue, I'm trying to implement an infinite scroll when the event 'ps-y-reach-start' more elements are provided, but the scroll bar jumps to the top... The position of the scrollbar should be preserved, but it's not :( |
@Dagdelo Are you able to reproduce it on code sandbox ? |
Yeah. Just give-me some time. |
https://codesandbox.io/s/vue-perfect-scrollbar-component-local-registration-gdrg4 If we add items on top of the list, the undesirable behavior happens... But when we add on the bottom it acts as expected. Note: if I don't call update on the PS instance, the scrollbar just updates when the user scrolls; Note2: when it comes to addition to the end of the list they work perfectly. |
@Dagdelo I edited your codesandbox project and just added local perfect scrollbar component with update method on $nextTick cycle. Just check it is helpful for you ? . https://codesandbox.io/s/vue-perfect-scrollbar-component-local-registration-rhvle?fontsize=14&hidenavigation=1&theme=dark |
Shouldn't it call
ps.update()
on the next tick after theupdated
hook has been called?See what Vue docs say:
https://vuejs.org/v2/api/#updated, (page source code)
The text was updated successfully, but these errors were encountered: