We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vuetify Version: 3.4.10 Vue Version: 3.4.11 Browsers: Mozilla Firefox OS: Windows 10
The callback is not executed anymore after calling done('empty')
Callback is still being called after done('empty')
https://play.vuetifyjs.com/#...
The text was updated successfully, but these errors were encountered:
My idea of this would be to have this emit called conditionally if the status isn't empty nor error
vuetify/packages/vuetify/src/components/VInfiniteScroll/VInfiniteScroll.tsx
Line 208 in 520b765
As a workaround we can just manage some kind of flag that keeps track of the scroll status in our own component, so we would have something like:
// pseudocode... const foundEmptyScroll = ref(false) async function load({ done }) { if (foundEmptyScroll.value) return const data = await getEndpointData() if (data.length > 0) { serverData.value.push(...data) done('ok') else { done('empty') } }
But in my opinion this would make more sense to be managed inside the component
Sorry, something went wrong.
Ran into the same issue. In the mean time I created a flag to stop the calls
async load({ done }) { if (this.noMorePosts) { done('empty'); return; } const offset = this.posts.length; const limit = 5; try { const newPosts = await this.getPosts(offset, limit); this.posts = this.posts.concat(newPosts); if (newPosts.length < limit) { this.noMorePosts = true; done('empty'); } done('ok'); } catch (error) { done('error'); } },
Duplicate of #18895
No branches or pull requests
Environment
Vuetify Version: 3.4.10
Vue Version: 3.4.11
Browsers: Mozilla Firefox
OS: Windows 10
Steps to reproduce
Expected Behavior
The callback is not executed anymore after calling done('empty')
Actual Behavior
Callback is still being called after done('empty')
Reproduction Link
https://play.vuetifyjs.com/#...
The text was updated successfully, but these errors were encountered: