dynamic-forms / Function

applyDerivationsForTrigger

Processes derivations for a specific trigger type.

Filters entries by trigger type and applies them.

Presentation

function applyDerivationsForTrigger(
  collection: DerivationCollection,
  trigger: "onChange" | "debounced",
  context: DerivationApplicatorContext,
  changedFields?: Set<string> | undefined,
): DerivationProcessingResult;

Returns

DerivationProcessingResult -

Result of the derivation processing

Parameters

NameTypeDescription
collection
DerivationCollection

The collected derivation entries

trigger
"onChange" | "debounced"

The trigger type to filter by

context
DerivationApplicatorContext

Context for applying derivations

changedFields
Set<string> | undefined

Set of field keys that changed (for filtering)