@refinedev/react-hook-form 4.4.2 → 4.6.0
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/README.md +12 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/iife/index.js +14 -6
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/useForm/index.d.ts +7 -1
- package/dist/useForm/index.d.ts.map +1 -1
- package/dist/useModalForm/index.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/useForm/index.spec.tsx +249 -0
- package/src/useForm/index.ts +91 -11
- package/src/useModalForm/index.ts +3 -2
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useModal,
|
|
9
9
|
useParsed,
|
|
10
10
|
useResource,
|
|
11
|
-
|
|
11
|
+
useUserFriendlyName,
|
|
12
12
|
useTranslate,
|
|
13
13
|
useWarnAboutChange,
|
|
14
14
|
} from "@refinedev/core";
|
|
@@ -126,6 +126,7 @@ export const useModalForm = <
|
|
|
126
126
|
|
|
127
127
|
const parsed = useParsed();
|
|
128
128
|
const go = useGo();
|
|
129
|
+
const getUserFriendlyName = useUserFriendlyName();
|
|
129
130
|
|
|
130
131
|
const action = actionProp ?? actionFromParams ?? "";
|
|
131
132
|
|
|
@@ -272,7 +273,7 @@ export const useModalForm = <
|
|
|
272
273
|
const title = translate(
|
|
273
274
|
`${identifier}.titles.${actionProp}`,
|
|
274
275
|
undefined,
|
|
275
|
-
`${
|
|
276
|
+
`${getUserFriendlyName(
|
|
276
277
|
`${actionProp} ${
|
|
277
278
|
resource?.meta?.label ??
|
|
278
279
|
resource?.options?.label ??
|