You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VirtualScroller: scrollInView method does not scroll to right item, when item is dynamically added
Same issue applies to DataTable when using VirtualScroller feature.
Place a VirtualScroller component on the page.
Add an item to the items array.
Use the ScrollInView method, to scroll to the newly created item on the very bottom.
Observe, that it is not fully scrolling to the bottom.
Expected behavior
ScrollInView method shall display the newly created item on the very bottom of the VirtualScroller.
The text was updated successfully, but these errors were encountered:
If items are added to the items array of the VirtualScroller component, the watcher is not executed and component parameters are therewith not re-computed based on the updated number of items.
A potential fix to the items watcher could look as follows (without respecting, if the array changed at all).
Describe the bug
VirtualScroller: scrollInView method does not scroll to right item, when item is dynamically added
Same issue applies to DataTable when using VirtualScroller feature.
Reproducer
https://stackblitz.com/edit/qe6t4tk3?file=src%2FApp.vue
PrimeVue version
4.2.5
Vue version
3.4.29
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome
Steps to reproduce the behavior
Place a VirtualScroller component on the page.
Add an item to the items array.
Use the ScrollInView method, to scroll to the newly created item on the very bottom.
Observe, that it is not fully scrolling to the bottom.
Expected behavior
ScrollInView method shall display the newly created item on the very bottom of the VirtualScroller.
The text was updated successfully, but these errors were encountered: