@refinedev/antd 5.3.11 → 5.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +43 -29
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/list/useSimpleList/useSimpleList.d.ts +2 -2
- package/dist/hooks/list/useSimpleList/useSimpleList.d.ts.map +1 -1
- package/dist/hooks/table/useEditableTable/useEditableTable.d.ts +1 -1
- package/dist/hooks/table/useEditableTable/useEditableTable.d.ts.map +1 -1
- package/dist/hooks/table/useTable/useTable.d.ts +2 -2
- package/dist/hooks/table/useTable/useTable.d.ts.map +1 -1
- package/dist/iife/index.js +12 -4
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/hooks/list/useSimpleList/useSimpleList.ts +1 -4
- package/src/hooks/table/useEditableTable/useEditableTable.ts +9 -2
- package/src/hooks/table/useTable/useTable.ts +3 -9
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@refinedev/antd",
|
3
|
-
"version": "5.3.
|
3
|
+
"version": "5.3.13",
|
4
4
|
"description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"devDependencies": {
|
26
26
|
"@refinedev/cli": "^2.1.0",
|
27
27
|
"@refinedev/ui-tests": "^1.3.2",
|
28
|
-
"@refinedev/core": "^4.5.
|
28
|
+
"@refinedev/core": "^4.5.9",
|
29
29
|
"@esbuild-plugins/node-resolve": "^0.1.4",
|
30
30
|
"@testing-library/jest-dom": "^5.16.4",
|
31
31
|
"@testing-library/react": "^13.1.1",
|
@@ -4,9 +4,7 @@ import { ListProps, FormProps, Form, Grid } from "antd";
|
|
4
4
|
import {
|
5
5
|
BaseRecord,
|
6
6
|
CrudFilters,
|
7
|
-
SuccessErrorNotification,
|
8
7
|
HttpError,
|
9
|
-
LiveModeProps,
|
10
8
|
useTable as useTableCore,
|
11
9
|
useTableProps as useTablePropsCore,
|
12
10
|
useTableReturnType,
|
@@ -21,8 +19,7 @@ export type useSimpleListProps<TData, TError, TSearchVariables> =
|
|
21
19
|
onSearch?: (
|
22
20
|
data: TSearchVariables,
|
23
21
|
) => CrudFilters | Promise<CrudFilters>;
|
24
|
-
}
|
25
|
-
LiveModeProps;
|
22
|
+
};
|
26
23
|
|
27
24
|
export type useSimpleListReturnType<
|
28
25
|
TData extends BaseRecord = BaseRecord,
|
@@ -29,7 +29,10 @@ type useEditableTableProps<
|
|
29
29
|
TError extends HttpError = HttpError,
|
30
30
|
TVariables = {},
|
31
31
|
TSearchVariables = unknown,
|
32
|
-
> =
|
32
|
+
> = Omit<
|
33
|
+
useTableProps<TData, TError, TSearchVariables>,
|
34
|
+
"successNotification" | "errorNotification"
|
35
|
+
> &
|
33
36
|
UseFormProps<TData, TError, TVariables>;
|
34
37
|
|
35
38
|
/**
|
@@ -53,7 +56,11 @@ export const useEditableTable = <
|
|
53
56
|
TSearchVariables
|
54
57
|
> = {},
|
55
58
|
): useEditableTableReturnType<TData, TError, TVariables, TSearchVariables> => {
|
56
|
-
const table = useTable<TData, TError, TSearchVariables>({
|
59
|
+
const table = useTable<TData, TError, TSearchVariables>({
|
60
|
+
...props,
|
61
|
+
successNotification: undefined,
|
62
|
+
errorNotification: undefined,
|
63
|
+
});
|
57
64
|
const edit = useForm<TData, TError, TVariables>({
|
58
65
|
...props,
|
59
66
|
action: "edit",
|
@@ -8,9 +8,7 @@ import {
|
|
8
8
|
useLiveMode,
|
9
9
|
BaseRecord,
|
10
10
|
CrudFilters,
|
11
|
-
SuccessErrorNotification,
|
12
11
|
HttpError,
|
13
|
-
LiveModeProps,
|
14
12
|
useTable as useTableCore,
|
15
13
|
useTableProps as useTablePropsCore,
|
16
14
|
useTableReturnType as useTableCoreReturnType,
|
@@ -27,13 +25,9 @@ export type useTableProps<
|
|
27
25
|
TData,
|
28
26
|
TError,
|
29
27
|
TSearchVariables = unknown,
|
30
|
-
> = useTablePropsCore<TData, TError> &
|
31
|
-
|
32
|
-
|
33
|
-
onSearch?: (
|
34
|
-
data: TSearchVariables,
|
35
|
-
) => CrudFilters | Promise<CrudFilters>;
|
36
|
-
};
|
28
|
+
> = useTablePropsCore<TData, TError> & {
|
29
|
+
onSearch?: (data: TSearchVariables) => CrudFilters | Promise<CrudFilters>;
|
30
|
+
};
|
37
31
|
|
38
32
|
export type useTableReturnType<
|
39
33
|
TData extends BaseRecord = BaseRecord,
|