Function: clearSelectionFor()
clearSelectionFor(
name,scope?):ClearedSelection
Defined in: mosaic-selection.ts:645
Clear ONE filter by name — a declared dimension or a live producer (component) — retracting its clause(s) AND resetting its visual state, leaving every other filter alone. The per-component companion to the whole-state resetSelectionDimTargets. Accepts qualified and leaf names alike; resolution order:
- a dimension →
dim.clear()— under component adoption this routes through the component's own publish path, so the visual clears too; - a producer →
selection.reset(its clauses)on the Selection the producer PUBLISHES INTO — the origin, never a crossfilter's relayed copy (see categorySelection).resetinvokessource.reset(), clearing a brush rectangle or menu pick; mosaic's Toggle implements no reset, so bound toggles are kept honest by the facet mirror instead (mosaic-facet.ts) — one more reason a category producer should have a dimension bound. Naming the producer clears a multi-dimension component (a 2-D map box) WHOLE — clearing just one of its paired dimensions instead widens that side to the full extent.
Throws — listing what IS clearable — when the name matches nothing.
Parameters
name
string
scope?
string | Scope