extractValue
Utility to unwrap a FieldTree into its underlying raw value.
API
function extractValue<T>(field: FieldTree<T>): RawValue<T>;
function extractValue<T>(
field: FieldTree<T>,
filter: ExtractFilter,
): DeepPartial<RawValue<T>>;function extractValue<T>(field: FieldTree<T>): RawValue<T>;Utility to unwrap a FieldTree into its underlying raw value.
This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.
FieldTree<T>The field tree to extract the value from.
RawValue<T>The raw value of the field tree.
function extractValue<T>(field: FieldTree<T>, filter: ExtractFilter): DeepPartial<RawValue<T>>;Utility to unwrap a FieldTree into its underlying raw value.
This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.
FieldTree<T>The field tree to extract the value from.
ExtractFilterCriteria to include only fields matching certain state (dirty, touched, enabled).
DeepPartial<RawValue<T>>A partial value containing only the fields matching the filter, or undefined if none match.
Description
Utility to unwrap a FieldTree into its underlying raw value.
This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.