Skip to main content
cngx-src documentation

SelectionControllerOptions

Interface

projects/core/utils/selection-controller.ts

Import#

import { SelectionControllerOptions } from '@cngx/core/utils'

Description#

Configuration options for createSelectionController.

Index#

Instance Properties#

cacheLimit#number
ReadonlyOptional

Optional cap on the per-value isSelected / isIndeterminate signal cache. Default: unlimited — preserves the signal-identity guarantee (isSelected(v) === isSelected(v) always holds for the lifetime of the controller).

When set, the caches FIFO-evict their oldest entries as soon as the size exceeds cacheLimit. After eviction, a re-queried value receives a NEW signal instance (values are equivalent; references differ). Set this only at grid / tree scale (10k+ rows) where memory retention matters more than reference stability.

childrenFn#function
ReadonlyOptional

Optional children lookup. When supplied, isIndeterminate(value) returns true iff SOME but not ALL descendants are selected. Flat lists omit this; isIndeterminate then always returns a shared Signal<false> constant (no per-value allocation).

ReadonlyOptional

Key extractor for membership Map. Defaults to the value itself (reference / primitive equality). Supply when T is a structural object that should be matched by a stable id.