Support for vanilla javascript #455
-
I was trying to use virtual in core js project but i am unable to make it work. Even after providing a valid scrollable element in getScrollElement function, the scrollToFn function never triggers and scrollElement inside VIrtualizer instance is null. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, you also need to provide observeElementRect, observeElementOffset, then after instance is created call |
Beta Was this translation helpful? Give feedback.
-
There seems to be one issue in the above implementation, I observed that in this case the number of elements in scroll container do not get limited. Even though I am viewing 5 elements on the container at a time i can see thousands of elements in my html elements. |
Beta Was this translation helpful? Give feedback.
Hi, you also need to provide observeElementRect, observeElementOffset, then after instance is created call
instance._willUpdate()
it will call provided options and setup the virtualizer. Something like https://stackblitz.com/edit/js-yc7vby?file=index.js,style.css,index.html