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

Function resetFields

src/createBaseForm.js:437–448  ·  view source on GitHub ↗
(ns)

Source from the content-addressed store, hash-verified

435 },
436
437 resetFields(ns) {
438 const newFields = this.fieldsStore.resetFields(ns);
439 if (Object.keys(newFields).length > 0) {
440 this.setFields(newFields);
441 }
442 if (ns) {
443 const names = Array.isArray(ns) ? ns : [ns];
444 names.forEach(name => delete this.clearedFieldMetaCache[name]);
445 } else {
446 this.clearedFieldMetaCache = {};
447 }
448 },
449
450 recoverClearedField(name) {
451 if (this.clearedFieldMetaCache[name]) {

Callers

nothing calls this directly

Calls 2

resetFieldsMethod · 0.80
setFieldsMethod · 0.80

Tested by

no test coverage detected