Browse Source

Merge branch 'hotfix/Form组件setFieldsValue'

shizhongming 2 năm trước cách đây
mục cha
commit
93df04393f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/components/Form/src/hooks/useFormEvents.ts

+ 1 - 1
src/components/Form/src/hooks/useFormEvents.ts

@@ -90,7 +90,7 @@ export function useFormEvents({
 
       // 0| '' is allow
       if (hasKey || !!constructValue) {
-        const fieldValue = constructValue || value;
+        const fieldValue = constructValue && !isFunction(constructValue) ? constructValue : value;
         // time type
         if (itemIsDateType(key)) {
           if (Array.isArray(fieldValue)) {