Browse Source

perf(useForm): If the args of the setFieldsValue is empty, it will not be executed. close #3209

pull/3215/head
invalid w 3 years ago
parent
commit
8f900871ac
  1. 4
      src/components/Form/src/hooks/useFormEvents.ts

4
src/components/Form/src/hooks/useFormEvents.ts

@ -111,6 +111,10 @@ export function useFormEvents({
* @description: Set form value
*/
async function setFieldsValue(values: Recordable): Promise<void> {
if (Object.keys(values).length === 0) {
return;
}
const fields = getAllFields();
// key 支持 a.b.c 的嵌套写法

Loading…
Cancel
Save