like-gold
like-gold7mo ago

useList syncwithlocation

how to disable useList syncwithlocation?
5 Replies
kapa.ai
kapa.ai7mo ago
Hi @tuanna_. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The syncWithLocation feature of the useSimpleList hook in Refine is set to false by default. This means that the state of useSimpleList (e.g., sort order, filters, pagination) is not automatically encoded in the query parameters of the URL, and when the URL changes, the useSimpleList state is not automatically updated to match. If you have previously set syncWithLocation to true and now want to disable it, you can do so by setting syncWithLocation back to false in your useSimpleList hook. Here's how you can do it:
useSimpleList({
syncWithLocation: false,
});
useSimpleList({
syncWithLocation: false,
});
This will prevent the useSimpleList state from syncing with the URL. For more information, you can refer to the Refine documentation (https://refine.dev/docs/ui-integrations/ant-design/hooks/use-simple-list#syncWithLocation). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai7mo ago
<@353701348463738885> kapa.ai is still learning and improving, please let us know how it did by reacting below
like-gold
like-gold7mo ago
i mean the useList not useSimpleList @kapa.ai i mean the useList not useSimpleList
kapa.ai
kapa.ai7mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry for the confusion, but based on the provided extracts, there's no specific information about a useList hook in Refine. The available hooks mentioned in the extracts are useTable and useSimpleList, both of which have a syncWithLocation property. If you're referring to one of these hooks and want to disable syncWithLocation, you can set it to false: For useTable:
useTable({
syncWithLocation: false,
});
useTable({
syncWithLocation: false,
});
For useSimpleList:
useSimpleList({
syncWithLocation: false,
});
useSimpleList({
syncWithLocation: false,
});
If you're referring to a different useList hook not mentioned in the extracts, I would recommend checking the specific documentation for that hook. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai7mo ago
<@353701348463738885> kapa.ai is still learning and improving, please let us know how it did by reacting below