@refinedev/core@4.44.3
版本发布时间: 2023-10-05 22:51:43
refinedev/refine最新发布版本:@refinedev/supabase@5.9.4(2024-09-03 19:48:37)
Patch Changes
-
#5050
613af0021f6
Thanks @alicanerdurmaz! - feat: passdataProviderName
toliveProvider.subscribe
method. From now on, you can usedataProviderName
to distinguish between different data providers in live provider.Refer to documentation for more info about multiple data providers ->
Usage
import { useForm, useList } from "@refinedev/core"; useList({ dataProviderName: "first-data-provider", }); useForm({ dataProviderName: "second-data-provider", });
import { LiveProvider } from "@refinedev/core"; export const liveProvider = (client: any): LiveProvider => { return { subscribe: ({ channel, types, params, callback, dataProviderName, }) => { console.log({ dataProviderName }); // "second-data-provider" }, }; };
-
#5053
857d4020a30
Thanks @alicanerdurmaz! - feat: The parameter types of data provider methods have been exported. From now on, you can use the parameter types of Data Provider methods.import type { DataProvider, GetListResponse // new exported types GetListParams, GetManyParams, GetOneParams, CreateParams, CreateManyParams, UpdateParams, UpdateManyParams, DeleteOneParams, DeleteManyParams, CustomParams, } from "@refinedev/core"; const myDataProvider: DataProvider = { getList: async (params: GetListParams): Promise<GetListResponse<any>> => { return { data: [], total: 0 }; }, };