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 am trying to avoid revalidation at first when the setSize function asks for more rows of data. I understand this is the expected behaviour if I set revalidateAll: true (SWRInfiniteConfiguration). The problem is that doing this, every time I ask for more rows it revalidates all the previous request. However, I would like to revalidate 2, 4 and 6 every time I upload some data (onFocus, for example) but do not do it the first time I ask for data.
Example (asking for two rows every time I invoke setSize)
Asks for 2
Asks for 2
Asks for 4
Asks for 2
Asks for 4
Asks for 6
Expected behaviour
When more rows are required or re-focusing a page (with revalidateOnFocus: true)
Asks for 2
Asks for 4
Asks for 6
I would like to know if I can specify some options or any implementation to avoid this behaviour.
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am trying to avoid revalidation at first when the setSize function asks for more rows of data. I understand this is the expected behaviour if I set revalidateAll: true (SWRInfiniteConfiguration). The problem is that doing this, every time I ask for more rows it revalidates all the previous request. However, I would like to revalidate 2, 4 and 6 every time I upload some data (onFocus, for example) but do not do it the first time I ask for data.
Example (asking for two rows every time I invoke setSize)
Asks for 2
Asks for 2
Asks for 4
Asks for 2
Asks for 4
Asks for 6
Expected behaviour
When more rows are required or re-focusing a page (with revalidateOnFocus: true)
Asks for 2
Asks for 4
Asks for 6
I would like to know if I can specify some options or any implementation to avoid this behaviour.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions