Skip to content

Releases: marmelab/ra-supabase

2.0.6

05 Jan 09:07
v2.0.6
dc88752
Compare
Choose a tag to compare
  • Fixes set password flow doesn't work (#44) n0rmanc

2.0.5

21 Dec 16:54
v2.0.5
4943659
Compare
Choose a tag to compare
  • Fix ra-language-french export

2.0.4

08 Sep 10:12
v2.0.4
2d27c72
Compare
Choose a tag to compare
  • Add support for redirectTo in supabaseAuthProvider
  • Document spanish translations

2.0.3

23 Mar 10:51
v2.0.3
cb585ee
Compare
Choose a tag to compare
  • Fix wrong build in 2.0.2

2.0.2

23 Mar 10:51
v2.0.2
6007763
Compare
Choose a tag to compare

2.0.1

06 Mar 16:21
v2.0.1
6fcc5ec
Compare
Choose a tag to compare
  • Fix invitations and password reset handling

2.0.0

06 Mar 10:41
v2.0.0
35cf220
Compare
Choose a tag to compare
  • Add compatibility with react-admin v4
  • Use ra-data-postgrest for the dataProvider
  • Add support for third party authentication providers

Migration

DataProvider

As 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" />

v1.1.2

22 Sep 13:05
Compare
Choose a tag to compare
  • Fix dataProvider.deleteMany (#7)
  • Fix Fix documentation examples (#8)

1.1.0

15 Sep 08:24
Compare
Choose a tag to compare
  • Add authProvider and Authentication handling in dataProvider
  • Add i18n package for translating the auth UI
  • Add full-text search
  • Refactor to monorepo

1.0.0

02 Aug 09:31
1458be2
Compare
Choose a tag to compare

Initial release