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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Versions:
React version: "^16.12.0"
React Table version: "^7.1.0"
Issue:
GIVEN I click the 'next' button for pagination once
THEN the next page loads 👍
GIVEN I click the 'next' button several times without waiting
THEN I fire off requests for pages that don't exist 👎
Detail:
I have a react-table with a component which, when clicked, goes to the next page using server side pagination:
I know whether there is an available
next
orprevious
page by what is returned in the server response:I am using the above to determine whether or not to disable the pagination buttons.
My issue is:
While the new paginated data is loading, the button is not disabled because the server hasn't yet finished responding.
Therefore if the user hammers the previous or next buttons they could be firing requests for pages that don't exist.
Is there a way I can detect whether
previousPage()
ornextPage()
are in the process of returning data?Beta Was this translation helpful? Give feedback.
All reactions