MCPcopy Index your code
hub / github.com/angular/components / toggle

Method toggle

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

* Toggles a value between selected and deselected. * @param value The value to toggle * @return Whether the selection changed as a result of this call

(value: T)

Source from the content-addressed store, hash-verified

102 * @return Whether the selection changed as a result of this call
103 */
104 toggle(value: T): boolean {
105 return this.isSelected(value) ? this.deselect(value) : this.select(value);
106 }
107
108 /**
109 * Clears all of the selected values.

Callers

nothing calls this directly

Calls 3

isSelectedMethod · 0.95
deselectMethod · 0.95
selectMethod · 0.95

Tested by

no test coverage detected