Skip to content
New issue

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

Add feature to manually load data with button #81

Closed

Conversation

Jordan-Ellis
Copy link

@Jordan-Ellis Jordan-Ellis commented Mar 24, 2024

A common paradigm for infinite scroll is to require the user to click a load more button before infinite scrolling starts. This prevents an issue where somebody can never reach the footer of the website.

This pull requests adds a manualload prop and loadMore slot. When manualload is true, the loadMore slot will be shown which contains a button to load more items. The user has to manually click the button in order to load more, instead of the infinite scroll automatically loading.

This prop has to be manually set which allows for different use cases. For example, within the load function you set manualload to false after the user clicks the button, enabling infinite scroll after the first click. Or you can keep it set to true, essentially turning the component into a load more button that handles all the state.

Copy link

netlify bot commented Mar 24, 2024

Deploy Preview for vue3-infinite-loading-demo ready!

Name Link
🔨 Latest commit e838a84
🔍 Latest deploy log https://app.netlify.com/sites/vue3-infinite-loading-demo/deploys/67b52913a8beee0008c82e77
😎 Deploy Preview https://deploy-preview-81--vue3-infinite-loading-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Jordan-Ellis Jordan-Ellis closed this by deleting the head repository Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant