(...selects: SelectableWithIndex<T>[])
| 84 | } |
| 85 | |
| 86 | deselect(...selects: SelectableWithIndex<T>[]) { |
| 87 | if (!this._multiple && selects.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) { |
| 88 | throw Error('SelectionSet: not multiple selection'); |
| 89 | } |
| 90 | |
| 91 | const before = this._getCurrentSelection(); |
| 92 | const toDeselect: SelectableWithIndex<T>[] = []; |
| 93 | |
| 94 | for (const select of selects) { |
| 95 | if (!this.isSelected(select)) { |
| 96 | continue; |
| 97 | } |
| 98 | |
| 99 | toDeselect.push(select); |
| 100 | this._markDeselected(this._getTrackedByValue(select)); |
| 101 | } |
| 102 | |
| 103 | const after = this._getCurrentSelection(); |
| 104 | this.changed.next({before, after}); |
| 105 | } |
| 106 | |
| 107 | private _markSelected(key: T | ReturnType<TrackByFunction<T>>, toSelect: SelectableWithIndex<T>) { |
| 108 | this._selectionMap.set(key, toSelect); |
nothing calls this directly
no test coverage detected