Skip to content

Commit

Permalink
fix: 修复 setFields 触发 onValuesChange 导致的死循环
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin committed Oct 26, 2023
1 parent 563f814 commit 8ca1fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ const FormItem = forwardRef<FormItemInstance, FormItemProps>((originalProps, ref
if (!shouldValidate.current) return;

// value change event
if (typeof name !== 'undefined') {
if (typeof name !== 'undefined' && shouldEmitChangeRef.current) {
if (formListName) {
// 整理 formItem 的值
const formListValue = merge([], calcFieldValue(name, formValue));
Expand Down

0 comments on commit 8ca1fc2

Please sign in to comment.