-
Hi there! I'm using I would like behavior that when sorting is changed all loaded pages are reset except the first one. I suppose I can use setQueryData but maybe there is a better way to achieve the desired behavior. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is something you'd need to implement in user-land with Partial deletion highly depends on your use-case. you want to the first one, somebody else might want the last one. I want them all, because if I've downloaded them already, why not show them. if you have a bi-directional infinite query, the "first" page might be the one in the middle, and so on :) |
Beta Was this translation helpful? Give feedback.
This is something you'd need to implement in user-land with
setQueryData
I believe. react-quey never deletes data it has already downloaded, unless you callreset
,clear
or it is garbage collected.Partial deletion highly depends on your use-case. you want to the first one, somebody else might want the last one. I want them all, because if I've downloaded them already, why not show them. if you have a bi-directional infinite query, the "first" page might be the one in the middle, and so on :)