x-ui-design 0.4.80 → 0.4.81

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/dist/index.esm.js CHANGED
@@ -1009,12 +1009,16 @@ const FormItem$1 = ({
1009
1009
  useEffect(() => {
1010
1010
  if (name && !getFieldInstance(name)) {
1011
1011
  registerField(name, rules);
1012
- setFieldInstance(name, fieldRef.current);
1013
1012
  }
1014
1013
  // eslint-disable-next-line react-hooks/exhaustive-deps
1015
1014
  }, [name, rules]);
1016
1015
  // eslint-disable-next-line react-hooks/exhaustive-deps
1017
1016
  useEffect(() => () => registerField(name, undefined, true), [name]);
1017
+ useEffect(() => {
1018
+ if (!getFieldInstance(name)) {
1019
+ setFieldInstance(name, fieldRef.current);
1020
+ }
1021
+ }, [name, fieldRef.current]);
1018
1022
  useEffect(() => {
1019
1023
  if (initialValue) {
1020
1024
  setFieldValue(name, initialValue);