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

Method _getFirstSelectedChip

src/material/chips/chip-listbox.ts:377–383  ·  view source on GitHub ↗

Returns the first selected chip in this listbox, or undefined if no chips are selected.

()

Source from the content-addressed store, hash-verified

375
376 /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
377 private _getFirstSelectedChip(): MatChipOption | undefined {
378 if (Array.isArray(this.selected)) {
379 return this.selected.length ? this.selected[0] : undefined;
380 } else {
381 return this.selected;
382 }
383 }
384
385 /**
386 * Determines if key manager should avoid putting a given chip action in the tab index. Skip

Callers 1

focusMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected