Skip to main content
cngx-src documentation

ArrayCommitHandler

Interface

projects/forms/select/shared/array-commit-handler.ts

Import#

import { ArrayCommitHandler } from '@cngx/forms/select'

Description#

API returned from createArrayCommitHandler.

Index#

Methods#

beginClear#void
beginClear(previous: T[], action: CngxSelectCommitAction<T[]>)

Same split as beginToggle - consumer pre-writes values.

@parampreviousT[]
beginToggle#void
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.

@paramnextT[]
@parampreviousT[]
retryLast#void

Replay the last commit. Routes to beginToggle/beginClear based on togglingOption(). No-op when preconditions are unmet.