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

Method getValueFromFields

src/createFieldsStore.js:118–125  ·  view source on GitHub ↗
(name, fields)

Source from the content-addressed store, hash-verified

116 }
117
118 getValueFromFields(name, fields) {
119 const field = fields[name];
120 if (field && 'value' in field) {
121 return field.value;
122 }
123 const fieldMeta = this.getFieldMeta(name);
124 return fieldMeta && fieldMeta.initialValue;
125 }
126
127 getAllValues = () => {
128 const { fieldsMeta, fields } = this;

Callers 2

setFieldsMethod · 0.95
FieldsStoreClass · 0.95

Calls 1

getFieldMetaMethod · 0.95

Tested by

no test coverage detected