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
I am trying to implement a DataTable component (version 4) with vertical virtual scrolling plus lazy loading.
I have a backend API call which fetches paginated data, eg. 10 per page.
The documentation has confused me a lot regarding this part.
Example virtualScrollOptions I pass to my DataTable: :virtualScrollerOptions="{ lazy: true, autoSize: true, showLoader: true, itemSize: 75, delay: 250, loading: lazyLoading, onLazyLoad: loadLazy, numToleratedItems: 10 }"
The problem is the 1st 10 items are loaded but scrolling down does not trigger the onLazyLoad method.
Also event.first property seems always 0.
On documentation page they try to simulate this with timeouts but it is a bit unclear how to handle in a real scenario with API calls.
For example do I need to prefill the DataTable with a big items array?
Does itemSize play a role in this? And if yes, what if the row height is not always the same?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello fellas!
Please help me with the following.
I am trying to implement a DataTable component (version 4) with vertical virtual scrolling plus lazy loading.
I have a backend API call which fetches paginated data, eg. 10 per page.
The documentation has confused me a lot regarding this part.
Example virtualScrollOptions I pass to my DataTable:
:virtualScrollerOptions="{ lazy: true, autoSize: true, showLoader: true, itemSize: 75, delay: 250, loading: lazyLoading, onLazyLoad: loadLazy, numToleratedItems: 10 }"
The problem is the 1st 10 items are loaded but scrolling down does not trigger the onLazyLoad method.
Also event.first property seems always 0.
On documentation page they try to simulate this with timeouts but it is a bit unclear how to handle in a real scenario with API calls.
For example do I need to prefill the DataTable with a big items array?
Does itemSize play a role in this? And if yes, what if the row height is not always the same?
I would appreciate any help!
Beta Was this translation helpful? Give feedback.
All reactions