projects/forms/select/shared/array-commit-handler.ts
import { ArrayCommitHandler } from '@cngx/forms/select'
API returned from createArrayCommitHandler.
void
beginClear(previous: T[], action: CngxSelectCommitAction<T[]>)
Same split as beginToggle - consumer pre-writes values.
values
T[]
CngxSelectCommitAction
beginToggle(next: T[], previous: T[], option: CngxSelectOptionDef<T>, action: CngxSelectCommitAction<T[]>)
Start a toggle commit. Consumer must perform the optimistic write + togglingOption.set(option) first; the handler drives the commit- controller lifecycle, reconciliation, and finalize dispatch.
togglingOption.set(option)
CngxSelectOptionDef
Replay the last commit. Routes to beginToggle/beginClear based on togglingOption(). No-op when preconditions are unmet.
beginToggle
beginClear
togglingOption()