Bladeren bron

fix: Form validate cannot be returned normally in the dev environment when StrictMode is turned on , close #2210 #2251

nekocode 1 jaar geleden
bovenliggende
commit
15f7d155ba
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      packages/semi-ui/form/hoc/withField.tsx

+ 1 - 0
packages/semi-ui/form/hoc/withField.tsx

@@ -413,6 +413,7 @@ function withField<
         }, [rules, validate]);
 
         useIsomorphicEffect(() => {
+            isUnmounted.current = false;
             // exec validate once when trigger include 'mount'
             if (validateOnMount) {
                 fieldValidate(value);