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

Method componentWillUnmount

src/FieldElemWrapper.js:11–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 }
10
11 componentWillUnmount() {
12 const { name, form } = this.props;
13 const fieldMeta = form.fieldsStore.getFieldMeta(name);
14 if (!fieldMeta.preserve) {
15 // after destroy, delete data
16 form.clearedFieldMetaCache[name] = {
17 field: form.fieldsStore.getField(name),
18 meta: fieldMeta,
19 };
20 form.clearField(name);
21 }
22 delete form.domFields[name];
23 }
24
25 render() {
26 return this.props.children;

Callers

nothing calls this directly

Calls 3

getFieldMetaMethod · 0.80
getFieldMethod · 0.80
clearFieldMethod · 0.80

Tested by

no test coverage detected