Supabase adapter for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
MIT License
Bot releases are visible (Hide)
Published by fzaninotto about 2 months ago
Published by slax57 about 2 months ago
HashRouter
& BrowserRouter
for Supabase redirections (#67) (arimet)<LoginPage>
will no longer automatically redirect to the app if the user is already authenticatedPublished by djhi 4 months ago
Published by djhi 10 months ago
ra-language-french
exportPublished by djhi about 1 year ago
redirectTo
in supabaseAuthProvider
Published by djhi over 1 year ago
2.0.2
Published by djhi over 1 year ago
Published by djhi over 1 year ago
Published by djhi over 1 year ago
ra-data-postgrest
for the dataProviderAs we now use ra-data-postgrest
, you now longer need to describe your resources. However, you must now pass the supabaseInstanceUrl
and the apiKey
:
// in dataProvider.js
import { supabaseDataProvider } from 'ra-supabase-core';
import { supabaseClient } from './supabase';
-const resources = {
- posts: ['id', 'title', 'body', 'author_id', 'date'],
- authors: ['id', 'full_name'],
-};
-export const dataProvider = supabaseDataProvider(supabaseClient, resources);
+export const dataProvider = supabaseDataProvider({
+ instanceUrl: 'YOUR_SUPABASE_URL',
+ apiKey: 'YOUR_SUPABASE_ANON_KEY',
+ supabaseClient
+});
When specifying the source
prop of filter inputs, you can now either set it to the field name for simple equality checks or add an operator suffix for more control. For instance, the gte
(Greater Than or Equal) or the ilike
(Case insensitive like) operators:
const postFilters = [
<TextInput label="Title" source="title@ilike" alwaysOn />,
<TextInput label="Views" source="views@gte" />,
];
export const PostList = () => (
<List filters={postFilters}>
...
</List>
);
See the PostgREST documentation for a list of supported operators.
We used to have full-text search support that required a special configuration:
// in dataProvider.js
import { supabaseDataProvider } from 'ra-supabase';
import { supabase } from './supabase';
const resources = {
posts: {
fields: ['id', 'title', 'body', 'author_id', 'date'],
fullTextSearchFields: ['title', 'body'],
},
authors: {
fields: ['id', 'full_name'],
fullTextSearchFields: ['full_name'],
},
};
export const dataProvider = supabaseDataProvider(supabase, resources);
This is now longer required as you can use PostgREST operators for this purpose (fts
, plfts
and wfts
). However this means the field on which you apply those operators must be of type tsvector
. You can follow Supabase documentation to create one.
Here's how to add a SearchInput
for such a column:
<SearchInput source="fts@my_column" />
Published by fzaninotto about 3 years ago
Published by fzaninotto about 3 years ago
Initial release