R
Refine

ask-any-question

how to adding custom type in option(queryOptions) select useCustom ?

Aambitious-aqua3/23/2023
my use case is to overrides data from api via select options(queryOptions) but i dont know how to adding custom type in useCustom to overrides existing type. according to tkdodo blog (https://tkdodo.eu/blog/react-query-and-type-script) the way to overrides generic type TQueryFnData is adding new type in 3rd generic type called TData = TQueryFnData in useQuery. how can i do to overrides TData from useCustom ? sorry for my bad english
React Query and TypeScript
Combine two of the most powerful tools for React Apps to produce great user experience, developer experience and type safety.
No description
Kkapa.ai3/23/2023
Hey @rdjanuar! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave: ---------------------- I understand that you want to override the data type in useCustom hook similar to how it's done in useQuery according to the blog post you mentioned. However, the information extracts provided do not contain any details about overriding the data type specifically for the useCustom hook in refine. To get a better understanding of how to work with useCustom and its options, you can refer to the useCustom documentation (https://refine.dev/docs/api-reference/core/hooks/data/useCustom). If you still have questions or need further assistance, please provide more information or extracts related to your query. ----------------------
Kkapa.ai3/23/2023
<@670249474035286017> kapa.ai is still learning and improving, please let us how it did by reacting below
Xxenophobic-harlequin3/23/2023
Hey @rdjanuar, Good catch! We are currently passing two generic types to useQuery, but we should be passing three as you mentioned. Can you open an issue? We'll get it fixed asap. 🚀
Aambitious-aqua3/23/2023
GitHub
useCustom missing 3rd generic type · Issue #3960 · refinedev/refine
my use case is to overrides data from api via select options(queryOptions) but i dont know how to adding custom type in useCustom to overrides existing type. according to tkdodo blog (https://tkdod...

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
TSconfig errorHey Everyone - I was wondering if anyone else was running into these errors as they were starting a I can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API'm trying to create a projectHello everyone, I'm trying to create a project but it only comes with the header, how do I get the sError after upgrade to v4: Uncaught Error: No QueryClient set, use QueryClientProvider to set oneHello everything is fine? by the stack trace the error is in the method: useIsAuthenticated, I am usMultitenant URLsHi all! Anyone have more info on how to provide props to the nextjs-router in v4? We are multitenanUsing response data in errorNotification useFormHello, My REST API sends a JSON with explanation of what's wrong with the response when request failImplement Google Maps in a FormHello everyone, I am having trouble implementing google maps in a form where the user should fill soCannot invoke an object which is possibly 'undefined'Hi everyone, can anyone help me with this? I trying to integrate Access Control with Supabase and whhow to prefetch data using refineprefetch data before showing itemCan't change title of AuthPageI tried to change my login page title like this: <AuthPage type="login" title={<h2>WelcoUse modal form to populate an array in the current recordHello all, I need some help here. I'm trying to implement modal form in a project I'm working on witDefine customized Logo on default LoginpageHi, how can i set a logo on default Loginpage. (I am using refine V4)