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

Method _setSelectedState

src/material/chips/chip-option.ts:196–210  ·  view source on GitHub ↗
(isSelected: boolean, isUserInput: boolean, emitEvent: boolean)

Source from the content-addressed store, hash-verified

194 }
195
196 _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean) {
197 if (isSelected !== this.selected) {
198 this._selected = isSelected;
199
200 if (emitEvent) {
201 this.selectionChange.emit({
202 source: this,
203 isUserInput,
204 selected: this.selected,
205 });
206 }
207
208 this._changeDetectorRef.markForCheck();
209 }
210 }
211}

Callers 6

selectedMethod · 0.95
selectMethod · 0.95
deselectMethod · 0.95
selectViaInteractionMethod · 0.95
toggleSelectedMethod · 0.95
ngAfterContentInitMethod · 0.80

Calls 1

markForCheckMethod · 0.80

Tested by

no test coverage detected