MCPcopy Create free account
hub / github.com/angular/components / _reportValueChange

Method _reportValueChange

src/material/list/selection-list.ts:227–236  ·  view source on GitHub ↗

Reports a value change to the ControlValueAccessor

()

Source from the content-addressed store, hash-verified

225
226 /** Reports a value change to the ControlValueAccessor */
227 _reportValueChange() {
228 // Stop reporting value changes after the list has been destroyed. This avoids
229 // cases where the list might wrongly reset its value once it is removed, but
230 // the form control is still live.
231 if (this.options && !this._isDestroyed) {
232 const value = this._getSelectedOptionValues();
233 this._onChange(value);
234 this._value = value;
235 }
236 }
237
238 /** Emits a change event if the selected state of an option changed. */
239 _emitChangeEvent(options: MatListOption[]) {

Callers 1

Calls 2

_onChangeMethod · 0.80

Tested by

no test coverage detected