Emits a change event and clears the records of selected and deselected values.
()
| 191 | |
| 192 | /** Emits a change event and clears the records of selected and deselected values. */ |
| 193 | private _emitChangeEvent() { |
| 194 | // Clear the selected values so they can be re-cached. |
| 195 | this._selected = null; |
| 196 | |
| 197 | if (this._selectedToEmit.length || this._deselectedToEmit.length) { |
| 198 | this.changed.next({ |
| 199 | source: this, |
| 200 | added: this._selectedToEmit, |
| 201 | removed: this._deselectedToEmit, |
| 202 | }); |
| 203 | |
| 204 | this._deselectedToEmit = []; |
| 205 | this._selectedToEmit = []; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | /** Selects a value. */ |
| 210 | private _markSelected(value: T) { |
no test coverage detected