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

feat: add pagination for events #37

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Laurin-W
Copy link
Collaborator

@Laurin-W Laurin-W commented Jul 4, 2023

Hey, I added a pagination functionality that caches the fetched events in the component's state.
I'm not sure how goof of a practice that is though, so as of now it's a work in progress.

What do you think of the approach @srosset81?

Addresses issue #36

@srosset81
Copy link
Contributor

Your PageCacheListBase component looks great but it doesn't work with my data (345 past events !)
Here's a video to show you: https://watch.screencastify.com/v/9qzWgwrwrL6xpQCeS4uM
I also have this warning in my console: "List components must be used inside a . Relying on props rather than context to get List data and callbacks is deprecated and won't be supported in the next major version of react-admin." Not a big problem probably.

@Laurin-W
Copy link
Collaborator Author

Laurin-W commented Jul 5, 2023

I also have this warning in my console: "List components must be used inside a . Relying on props rather than context to get List data and callbacks is deprecated and won't be supported in the next major version of react-admin." Not a big problem probably.

Thanks! Got that fixed by putting the ListPaginationContext in a subcomponent :)

Here's a video to show you: https://watch.screencastify.com/v/9qzWgwrwrL6xpQCeS4uM

Unfortunately, I can't see the video. Could you send another link?

@srosset81
Copy link
Contributor

Here's another video recording:

capture-video-bug-pagination.mp4

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.

2 participants