You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
MorenoMdz
changed the title
Feature Request - Reset Items
Feature Request - Reset Items List
Sep 7, 2020
I was trying to play with the code in the hook, I was able to reset the list adding a RESET action
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.
The text was updated successfully, but these errors were encountered: