MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / updateMounted

Function updateMounted

src/useFieldArray.ts:427–432  ·  view source on GitHub ↗
(name: InternalFieldName, value: boolean)

Source from the content-addressed store, hash-verified

425
426 return () => {
427 const updateMounted = (name: InternalFieldName, value: boolean) => {
428 const field: Field = get(control._fields, name);
429 if (field && field._f) {
430 field._f.mount = value;
431 }
432 };
433
434 control._options.shouldUnregister || shouldUnregister
435 ? control.unregister(name as FieldPath<TFieldValues>)

Callers 1

useFieldArrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected