MCPcopy
hub / github.com/react-component/form / onCollect

Function onCollect

src/createBaseForm.js:133–150  ·  view source on GitHub ↗
(name_, action, ...args)

Source from the content-addressed store, hash-verified

131 },
132
133 onCollect(name_, action, ...args) {
134 const { name, field, fieldMeta } = this.onCollectCommon(
135 name_,
136 action,
137 args,
138 );
139 const { validate } = fieldMeta;
140
141 this.fieldsStore.setFieldsAsDirty();
142
143 const newField = {
144 ...field,
145 dirty: hasRules(validate),
146 };
147 this.setFields({
148 [name]: newField,
149 });
150 },
151
152 onCollectValidate(name_, action, ...args) {
153 const { field, fieldMeta } = this.onCollectCommon(name_, action, args);

Callers

nothing calls this directly

Calls 3

hasRulesFunction · 0.90
setFieldsAsDirtyMethod · 0.80
setFieldsMethod · 0.80

Tested by

no test coverage detected