Function
runPresetAction
@ng-forge/dynamic-forms
Apply a built-in preset action against the addon's host field. Shared
across all adapters — each adapter's provider
delegates here.ADDON_PRESET_HANDLER
Presets that require adapter-specific UI mechanics (clipboard, type override) are best-effort — they no-op with a warning when the necessary collaborator isn't available (e.g., toggle-password-visibility outside an input field).
Signature
function runPresetAction(
preset: AddonActionPreset,
ctx: AddonActionContext,
collaborators: PresetCollaborators,
adapterLabel: string,
fieldLabel: string
): Promise<void>Parameters
| Name | Type | Description |
|---|---|---|
preset | AddonActionPreset | - |
ctx | AddonActionContext | - |
collaborators | PresetCollaborators | - |
adapterLabel | string | Used in warnings — 'Material' / 'Bootstrap' / etc. |
fieldLabel | string | Used in warnings — 'mat-input' / 'bs-input' / etc. |
Returns
Promise<void>
packages/dynamic-forms/src/lib/addons/run-preset-action.ts:62