withValueExclusionDefaults
Configures global value exclusion defaults for form submission output.
Value exclusion is enabled by default — field values are excluded from the (submitted) output based on their reactive state. Use this feature to override those defaults. This does NOT affect two-way binding (value model / entity) — fields retain their values internally.
Notes
Precedence rules:
- Per-field
excludeValueIf*on— wins for that fieldFieldDef - Per-form
excludeValueIf*on— wins for all fields in that formFormOptions - Global
— baseline defaultwithValueExclusionDefaults () - No global feature — uses token default (all enabled)
Presentation
function withValueExclusionDefaults (
config?: Partial<ValueExclusionConfig > | undefined,
): DynamicFormFeature <"value-exclusion">;Returns
DynamicFormFeature <"value-exclusion"> -A DynamicFormFeature that configures value exclusion defaults
Parameters
| Name | Type | Description |
|---|---|---|
| config | Partial< | Partial override of exclusion rules. Unspecified properties default to |
Example usage
Default behavior (all exclusions enabled)
Disable specific exclusions
provideDynamicForm (
...withMaterialFields (),
withValueExclusionDefaults ({ excludeValueIfReadonly: false })
)Disable all exclusions (restore pre-v1 behavior)
provideDynamicForm (
...withMaterialFields (),
withValueExclusionDefaults ({
excludeValueIfHidden: false,
excludeValueIfDisabled: false,
excludeValueIfReadonly: false,
})
)