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

Method _getChipStream

src/material/chips/chip-set.ts:205–212  ·  view source on GitHub ↗

* Gets a stream of events from all the chips within the set. * The stream will automatically incorporate any newly-added chips.

(
    mappingFunction: (chip: C) => Observable<T>,
  )

Source from the content-addressed store, hash-verified

203 * The stream will automatically incorporate any newly-added chips.
204 */
205 protected _getChipStream<T, C extends MatChip = MatChip>(
206 mappingFunction: (chip: C) => Observable<T>,
207 ): Observable<T> {
208 return this._chips.changes.pipe(
209 startWith(null),
210 switchMap(() => merge(...(this._chips as QueryList<C>).map(mappingFunction))),
211 );
212 }
213
214 /** Checks whether an event comes from inside a chip element. */
215 protected _originatesFromChip(event: Event): boolean {

Callers 6

chipFocusChangesMethod · 0.95
chipDestroyedChangesMethod · 0.95
chipRemovedChangesMethod · 0.95
chipBlurChangesMethod · 0.80
chipSelectionChangesMethod · 0.80
chipBlurChangesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected