useForm disable useOne

Hello i read the docs and the edit action is calling automatically useOne(), is any method to disable this useOne hook ?
3 Replies
kapa.ai6mo ago
Hi @Gas-Moraa. I'm, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The documentation does not provide a direct way to disable the useOne hook within the useForm hook. The useForm hook in Refine is designed to automatically handle data fetching and mutation logic, including the use of useOne, useUpdate, and useCreate hooks. If you want to customize the data fetching behavior, you might need to use these hooks separately or create a custom hook. I recommend checking the documentation for more details: - useForm documentation ( - useOne documentation ( - useUpdate documentation ( - useCreate documentation ( ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai6mo ago
<@597180208310910977> is still learning and improving, please let us know how it did by reacting below
rival-black6mo ago
Hey @Gas-Moraa You can pass queryOptions: { enabled: false } to your useForm hook, to disable get query for your edit page.
useForm | Refine
A hook that orchestrates Refine's data hooks to create, edit, and clone data. It also provides a set of features to make it easier for users to implement their real world needs and handle edge cases such as redirects, invalidation, auto-save and more.