Replies: 1 comment
-
Hello, same problem here. I just also opened a similar question myself. I cannot understand the concept of prefilling with a fixed-size array. This cannot work in real applications. Let's find a solution together, or maybe a fella from PrimeVue may assist us. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello PrimeVue experts,
I'm exploring how to properly integrate the VirtualScroller component with a backend that provides paginated responses. For context, a paginated API delivers data in discrete chunks or "pages." Here’s an example of a typical paginated API response and how the data is queried:
API Query Example:
GET /items?page=1
API Response Format:
As outlined in the lazy loading section of the VirtualScroller documentation, the example initializes with a fixed-sized array. However, in real applications where the size of the dataset can change and isn't known in advance, I would initialize the component with something like
const items = ref([])
.However, I find that attempting to dynamically load more data or otherwise change the size of the
items
array results in unpredictable behavior, suggesting that the component might be expecting a fixed-size array as shown in the VirtualScroller documentation.I would appreciate it if somebody could provide concrete examples or advice on how to effectively wire the VirtualScroller with paginated APIs. I'm particularly interested in tips on managing dynamically changing data sizes and ensuring a smooth user experience.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions