Use more than one Supabase Table on one Page
Hey lovely Refine Team, I cant find how to use Data of two Supabase Tables on one Page.

14 Replies
Hey @eliot0801! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Refine documentation (https://refine.dev/docs) for more information on working with data providers and hooks.
----------------------
Overview | refine
What is refine?
<@244579825140891648> kapa.ai is still learning and improving, please let us how it did by reacting below
dependent-tan•2y ago
Can you give me more detail please ? what is your use case senario?
how to change resource property
https://refine.dev/docs/api-reference/mui/hooks/useDataGrid/#resource
how to handle relational data
https://refine.dev/docs/api-reference/mui/hooks/useDataGrid/#how-can-i-handle-relational-data
fascinating-indigo•2y ago
Hey @eliot0801,
For example, you can call
useTable
multiple times in a single component. By default, refine hooks infer the resource
name from the URL, but you can also pass it in as a parameter.
For example, if you have a table called cases
and a table called posts
, you can do something like this:
vicious-goldOP•2y ago
I want to use in this Resource/Page Data from another Table of Supabase

vicious-goldOP•2y ago
In this page I need Data from another Table

dependent-tan•2y ago
you can use multiple data provider https://refine.dev/docs/api-reference/core/providers/data-provider/#multiple-data-providers
you can change dataProviderName https://refine.dev/docs/api-reference/mui/hooks/useDataGrid/#dataprovidername
vicious-goldOP•2y ago
Thx you, I am gonna try
dependent-tan•2y ago
you can give data provider name to resource. much easier
if you are using refine@3
meta
should be options
vicious-goldOP•2y ago
Yeah thx you Alican 🙂
complex-teal•2y ago

complex-teal•2y ago
I want to use the same dataProvider. I cant import QueryClientProvider, since I have 'react-query' not installed. Do I really need to install that?
The big problem is following:
We want to use the create page. But it has to create its values into two tables:
this one is working. Its assigning the value prop to our table "case" into the "title" field.
Now I want another TextField, that assigns the value into our other table called "caseDescription" into the "age" field for example:
Is something like that possible?
I guess not? Is it possible by swizzling the page?
So Refine cant handle two tables in v4 for useForm? Thats so sad, bc I really liked Refine but if thats not possible I gotta drop it
dependent-tan•2y ago
useDataGrid
can't connect two API (or supabase table) at the same time.
you need to mount 2 useDataGrid
and you should manually merge data. after that with that data you can create your <DataGrid>
or you can use useDataGrid
and for other data you can use useList
. after that you should merge data