API returned from {@link createScalarCommitHandler}
ScalarCommitHandler
Interface
projects/forms/select/shared/scalar-commit-handler.ts
Import#
import { ScalarCommitHandler } from '@cngx/forms/select'
Description#
API returned from createScalarCommitHandler.
Index#
Methods#
beginCommit(intended: T, previous: T | undefined, action: CngxSelectCommitAction<T>)Start a commit. Consumer pre-writes optimistic value.set(intended)
togglingOption.set(option); handler drives the state machine.
dispatchFromActivation(intended: T, option: CngxSelectOptionDef<T>)Dispatch a commit from AD activation. No-op when commitAction is
unbound - wire the onActivate path to finalizeSelection in that
case.
@paramintended
TfinalizeSelection(intended: T, option: CngxSelectOptionDef<T>, previousValue: T | undefined)Non-commit finalization.