CngxMaterialBidirectionalSyncOptions
projects/common/data/material-bridge/bidirectional-sync.ts
Import#
import { CngxMaterialBidirectionalSyncOptions } from '@cngx/common/data'
Description#
Options for createMaterialBidirectionalSync.
Material types never enter this surface. The caller maps Material's
own event/property shape to a host-agnostic Signal<number> /
Observable<number> / getter / setter at the directive boundary.
That keeps @cngx/common/data independent of @angular/material.
Index#
Instance Properties#
Routes a Material→presenter selection event into the presenter's
select(idx) method. Subject to an equality guard against
presenterIndex() so re-entrant events (the presenter's own
write firing back through Material) drop without re-routing.
SignalReactive source for the presenter's current index. The factory's
effect() tracks this signal — when it changes, Material is
written (subject to the equality guard against the Material
read-side).
Pulls the Material instance's current selectedIndex (or
equivalent). Called inside untracked() so the effect does not
subscribe to any signals the getter might read internally.
ObservableStream of Material-driven selection changes, already mapped to a
plain index by the caller (MatTabGroup.selectedIndexChange
forwards directly; MatStepper.selectionChange needs
.pipe(map(e => e.selectedIndex))).