Skip to content

Commit 832be04

Browse files
committed
chore: clean up
1 parent fc1f633 commit 832be04

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/hooks/useForm.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,9 @@ export class FormStore {
200200
};
201201

202202
private notifyWatch = (namePath: InternalNamePath[] = []) => {
203-
// // No need to cost perf when nothing need to watch
204-
// if (this.watchList.length) {
205-
// const values = this.getFieldsValue();
206-
// const allValues = this.getFieldsValue(true);
207-
208-
// this.watchList.forEach(callback => {
209-
// callback(values, allValues, namePath);
210-
// });
211-
// }
212203
this.watcherCenter.notify(namePath);
213204
};
214205

215-
// private notifyWatchNamePathList: InternalNamePath[] = [];
216-
// private batchNotifyWatch = (namePath: InternalNamePath) => {
217-
// this.notifyWatchNamePathList.push(namePath);
218-
// this.batch('notifyWatch', () => {
219-
// this.notifyWatch(this.notifyWatchNamePathList);
220-
// this.notifyWatchNamePathList = [];
221-
// });
222-
// };
223-
224206
// ========================== Dev Warning =========================
225207
private timeoutId: any = null;
226208

@@ -652,7 +634,6 @@ export class FormStore {
652634
private registerField = (entity: FieldEntity) => {
653635
this.fieldEntities.push(entity);
654636
const namePath = entity.getNamePath();
655-
// this.batchNotifyWatch(namePath);
656637
this.notifyWatch([namePath]);
657638

658639
// Set initial values
@@ -693,7 +674,6 @@ export class FormStore {
693674
}
694675
}
695676

696-
// this.batchNotifyWatch(namePath);
697677
this.notifyWatch([namePath]);
698678
};
699679
};
@@ -760,7 +740,6 @@ export class FormStore {
760740
type: 'valueUpdate',
761741
source: 'internal',
762742
});
763-
// this.batchNotifyWatch(namePath);
764743
this.notifyWatch([namePath]);
765744

766745
// Dependencies update

0 commit comments

Comments
 (0)