-
Notifications
You must be signed in to change notification settings - Fork 1
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
Async items #1
Comments
@michalpokojski so sorry I didn't see this! Glad you like it. Can you provide a minimal repro for your issue? I think if I just add |
Actually, it's already there: const onResetPage = useCallback(
() => dispatch({ type: 'reset', initialState: props }),
[props.items.length]
) but somehow it doesn't work, will try to reproduce it somewhere @edit Something like this: https://codesandbox.io/s/vv5q4jx180 |
@dylangarcia This issue still exists. Thanks for a very simple solution! Also, is it possible to have a method that lists out page numbers in a specified format? |
Super useful component :) Great work!
I've found one bug. It doesn't work with async items.
simple fix:
and everything works fine :)
I also tried on my side to trigger almost the same thing by using
pagination.onResetPage()
butuseCallback
from react memoize initial props souseEffect
has come in handy 👍The text was updated successfully, but these errors were encountered: