rival-black
rival-black6mo ago

autocomplete infinite scroll

how can i add pagination to Autocomplete component on scroll, it will fetch new options everytime i scroll to end
2 Replies
kapa.ai
kapa.ai6mo ago
Hi @Alfaz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not contain specific information on how to add infinite scroll pagination to an Autocomplete component. However, they do mention that pagination can be enabled in refine by setting the pagination.mode prop to "server" in the useAutocomplete hook. Here is the example code provided in the extracts:
useAutocomplete({
pagination: {
mode: "server",
},
})
useAutocomplete({
pagination: {
mode: "server",
},
})
This code enables server-side pagination, but it doesn't specify how to implement infinite scroll. For more detailed information, you may want to refer to the refine documentation (https://refine.dev/docs). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai6mo ago
<@763439201353596968> kapa.ai is still learning and improving, please let us know how it did by reacting below