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
There are many cases where we need to handle pagination. RTK doesn't offer an out-of-the-box solution but gives suggestions.
Proposal
We should find a common solution when we face pagination. That should simplify assessing whether we expect more items after we get the first page.
Based on the situation, the React comment can decide the best strategy: either show already the first items and allow early interactions (possibly indicating when more items are loading) or wait for the whole content.
We can start with namespaces as a follow-up to #2606
In that case, we need to fetch >100. We could actually fetch 20 by 20 and let the user pick one already, showing a spinning wheel when more namespaces are coming.
Context
This approach is useful when the total number of items we expect is within a reasonable boundary.
When we have thousands of items, relying on backend search is a better strategy -- an example is the entity search.
The text was updated successfully, but these errors were encountered:
As a note here, the suggestion component we are using supports async fetching of suggestions, so we can use it to show potential namespace picks based on what the user starts typing.
lorenzo-cavazzi
changed the title
Handle pagination on RTK query with a reusable solution - Namespaces
Gradually fetch namespaces ba handling pagination on RTK query
Nov 3, 2023
lorenzo-cavazzi
changed the title
Gradually fetch namespaces ba handling pagination on RTK query
Gradually fetch namespaces by handling pagination on RTK query
Jan 8, 2024
Motivation
There are many cases where we need to handle pagination. RTK doesn't offer an out-of-the-box solution but gives suggestions.
Proposal
We should find a common solution when we face pagination. That should simplify assessing whether we expect more items after we get the first page.
Based on the situation, the React comment can decide the best strategy: either show already the first items and allow early interactions (possibly indicating when more items are loading) or wait for the whole content.
We can start with namespaces as a follow-up to #2606
In that case, we need to fetch >100. We could actually fetch 20 by 20 and let the user pick one already, showing a spinning wheel when more namespaces are coming.
Context
This approach is useful when the total number of items we expect is within a reasonable boundary.
When we have thousands of items, relying on backend search is a better strategy -- an example is the entity search.
The text was updated successfully, but these errors were encountered: