CommonAddonActionPreset
@ng-forge/dynamic-forms
Built-in preset actions shared across adapters.
Adapter kinds that accept a preset field render the corresponding
behaviour:
- 'clear': empties the field value.
- 'reset': restores the field's configured default value (resolved
from the form's defaultValues map at click time); falls back to
empty when no default is reachable.
- 'paste': reads from the system clipboard and writes the result.
- 'copy': writes the field's current value to the system clipboard.
- 'toggle-password-visibility': flips a host input's type between
password and text (requires the host field to provide a type
override token, e.g., ).PRIME_INPUT_TYPE_OVERRIDE
Form submission is intentionally NOT exposed as a button-addon preset —
use the dedicated 'submit' field type instead.
Signature
type CommonAddonActionPreset = 'clear' | 'reset' | 'paste' | 'copy' | 'toggle-password-visibility';Properties
| Name | Type | Description |
|---|---|---|
"clear" | literal | - |
"reset" | literal | - |
"paste" | literal | - |
"copy" | literal | - |
"toggle-password-visibility" | literal | - |
packages/dynamic-forms/src/lib/models/addon/addon-action.ts:93