Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ export class FormStore {
data: fieldData,
});
});

//validation of the fields to be rerun when someone sets the value using setFields/setFieldValue
this.validateFields(namePathList)
this.notifyWatch(namePathList);
};

Expand Down Expand Up @@ -764,16 +765,18 @@ export class FormStore {
this.warningUnhooked();

const prevStore = this.store;

const namesLists = Object.keys(store);
if (store) {
const nextStore = merge(this.store, store);
this.updateStore(nextStore);
}

}
this.notifyObservers(prevStore, null, {
type: 'valueUpdate',
source: 'external',
});
//validation of the fields to be rerun when someone sets the value using setFieldsValue
this.validateFields(namesLists)
this.notifyWatch();
};

Expand Down