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

Feature Request - Reset Items List #4

Open
MorenoMdz opened this issue Sep 7, 2020 · 0 comments
Open

Feature Request - Reset Items List #4

MorenoMdz opened this issue Sep 7, 2020 · 0 comments

Comments

@MorenoMdz
Copy link

I was trying to play with the code in the hook, I was able to reset the list adding a RESET action

    function resetItems() {
        dispatch({ type: "RESET" });
    }

This will set the state back to initialState, it does reset the item list, but I don't quite understand how the cycle of the pagination work there, that way it does not restart fetching items anymore after a reset.

The idea is to use this in a search form, and reset when needed to have a clear list and refetch the correct list with pagination.

@MorenoMdz MorenoMdz changed the title Feature Request - Reset Items Feature Request - Reset Items List Sep 7, 2020
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

1 participant