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

Infinite scroll load more delay #1990

Closed
jean-moldovan opened this issue Apr 27, 2018 · 4 comments
Closed

Infinite scroll load more delay #1990

jean-moldovan opened this issue Apr 27, 2018 · 4 comments
Milestone

Comments

@jean-moldovan
Copy link

Hello,

What was the reason for infinite scroll to have 50ms delay when making the first poll?
https://github.com/quasarframework/quasar/blob/dev/src/components/infinite-scroll/QInfiniteScroll.js#L74

This makes loading state a bit harder to manage.
Here is an example:
https://jsfiddle.net/waugrryy/1731/

When the page loads:

  1. Displays 'No items to display' for 50ms
  2. Displays 'Loading' while making async call
  3. Displays 'No items to display' after call is made

This results in unnecessary flickering. Doesn't look that nice.

Expected:

  1. Displays 'Loading' right away
  2. Displays 'No items to display' after call is made

Thanks!

@a47ae
Copy link
Contributor

a47ae commented Apr 28, 2018

I think simply setting the immediate parameter to true in this line https://github.com/quasarframework/quasar/blob/dev/src/components/infinite-scroll/QInfiniteScroll.js#L74 should solve this, I also see no obvious reason why it should be debounced on the first call.

@rstoenescu rstoenescu added this to the 0.15.11 milestone May 4, 2018
@rstoenescu
Copy link
Member

Available in future 0.15.11

@jean-moldovan
Copy link
Author

Thanks!

@rstoenescu Does it make sense not to debounce the first poll after resume as well?

@jean-moldovan
Copy link
Author

Imagine you want to apply a filter to a list of items.
You would do:

        this.$refs.infiniteScroll.reset()
        this.$refs.infiniteScroll.resume()

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

No branches or pull requests

3 participants