* Updates the current selection in the model. * @param value New selection that should be assigned. * @param source Object that triggered the selection change.
(value: S, source: unknown)
| 76 | * @param source Object that triggered the selection change. |
| 77 | */ |
| 78 | updateSelection(value: S, source: unknown) { |
| 79 | const oldValue = (this as {selection: S}).selection; |
| 80 | (this as {selection: S}).selection = value; |
| 81 | this._selectionChanged.next({selection: value, source, oldValue}); |
| 82 | } |
| 83 | |
| 84 | ngOnDestroy() { |
| 85 | this._selectionChanged.complete(); |