extended-salmon
extended-salmon10mo ago

Is it possible to use useTable without Sync?

Lets say I want to use useTable for a dynamic searchForm inside of a Wizard. How would I deactivate the adjustment of query-Params of useTable? So to say: Is it possible to deactivate the "sync" of useTable on the hook itself?
2 Replies
kapa.ai
kapa.ai10mo ago
Hi @bastianwegge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, it is possible to deactivate the "sync" of useTable on the hook itself. You can do this by setting the syncWithLocation property to false when you use the useTable hook. By default, syncWithLocation is set to false. Here is an example of how you can do this:
useTable({
syncWithLocation: false,
});
useTable({
syncWithLocation: false,
});
When syncWithLocation is set to false, the useTable's state (e.g. sort order, filters, pagination) will not be encoded in the query parameters of the URL. Therefore, when the URL changes, the useTable state will not be updated to match. You can find more information about this in the Refine documentation (https://refine.dev/docs/api-reference/core/hooks/useTable). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai10mo ago
<@317433576721219584> kapa.ai is still learning and improving, please let us know how it did by reacting below