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

Method toggleValue

src/cdk/listbox/listbox.ts:502–507  ·  view source on GitHub ↗

* Toggle the selected state of the given value. * @param value The value to toggle

(value: T)

Source from the content-addressed store, hash-verified

500 * @param value The value to toggle
501 */
502 toggleValue(value: T) {
503 if (this._invalid) {
504 this.selectionModel.clear(false);
505 }
506 this.selectionModel.toggle(value);
507 }
508
509 /**
510 * Select the given option.

Callers 1

toggleMethod · 0.95

Calls 2

clearMethod · 0.65
toggleMethod · 0.65

Tested by

no test coverage detected