MCPcopy
hub / github.com/angular/components / _emitChangeEvent

Method _emitChangeEvent

src/cdk/collections/selection-model.ts:193–207  ·  view source on GitHub ↗

Emits a change event and clears the records of selected and deselected values.

()

Source from the content-addressed store, hash-verified

191
192 /** Emits a change event and clears the records of selected and deselected values. */
193 private _emitChangeEvent() {
194 // Clear the selected values so they can be re-cached.
195 this._selected = null;
196
197 if (this._selectedToEmit.length || this._deselectedToEmit.length) {
198 this.changed.next({
199 source: this,
200 added: this._selectedToEmit,
201 removed: this._deselectedToEmit,
202 });
203
204 this._deselectedToEmit = [];
205 this._selectedToEmit = [];
206 }
207 }
208
209 /** Selects a value. */
210 private _markSelected(value: T) {

Callers 4

clearMethod · 0.95
_selectMethod · 0.95
_deselectMethod · 0.95
_setSelectionMethod · 0.95

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected