@carefrees/form-utils-react-hooks 0.0.7 → 0.0.9

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.
@@ -16,10 +16,10 @@ const useRegisterFormList = (options)=>{
16
16
  formListInstance.formItemInstance = formItemInstance;
17
17
  formListInstance.parentDataField = parentName;
18
18
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
19
- const unMount = form.registerFormList(options.name, formListInstance);
19
+ const unMount = form.registerFormList(newName, formListInstance);
20
20
  return ()=>unMount();
21
21
  }, [
22
- options.name,
22
+ newName,
23
23
  formListInstance
24
24
  ]);
25
25
  return {
@@ -44,10 +44,10 @@ const useRegisterFormList = (options)=>{
44
44
  formListInstance.formItemInstance = formItemInstance;
45
45
  formListInstance.parentDataField = parentName;
46
46
  (0, external_react_namespaceObject.useEffect)(()=>{
47
- const unMount = form.registerFormList(options.name, formListInstance);
47
+ const unMount = form.registerFormList(newName, formListInstance);
48
48
  return ()=>unMount();
49
49
  }, [
50
- options.name,
50
+ newName,
51
51
  formListInstance
52
52
  ]);
53
53
  return {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "SunLxy <1011771396@qq.com>",
4
4
  "description": "表单组件公共hooks",
5
5
  "homepage": "https://github.com/SunLxy/carefrees-form-utils",
6
- "version": "0.0.7",
6
+ "version": "0.0.9",
7
7
  "main": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
9
  "module": "esm/index.js",
@@ -21,7 +21,7 @@
21
21
  "esm"
22
22
  ],
23
23
  "dependencies": {
24
- "@carefrees/form-utils": "^0.0.7"
24
+ "@carefrees/form-utils": "^0.0.9"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "18.2.21",
@@ -19,9 +19,9 @@ export const useRegisterFormList = (options: RegisterFormListOptions) => {
19
19
  formListInstance.parentDataField = parentName;
20
20
 
21
21
  useEffect(() => {
22
- const unMount = form.registerFormList(options.name, formListInstance);
22
+ const unMount = form.registerFormList(newName, formListInstance);
23
23
  return () => unMount();
24
- }, [options.name, formListInstance]);
24
+ }, [newName, formListInstance]);
25
25
 
26
26
  return {
27
27
  ruleInstance,