Resets the active state of the grid if it is empty or stale.
()
| 276 | |
| 277 | /** Resets the active state of the grid if it is empty or stale. */ |
| 278 | resetStateEffect(): void { |
| 279 | const hasReset = this.gridBehavior.resetState(); |
| 280 | |
| 281 | if (hasReset) { |
| 282 | // If the active state has been reset right after a focusout event, then |
| 283 | // we know it's caused by a row/cell deletion. |
| 284 | if (this._maybeDeletion()) { |
| 285 | this._deletion.set(true); |
| 286 | } else { |
| 287 | this._stateStale.set(true); |
| 288 | } |
| 289 | } |
| 290 | // Reset maybe deletion state. |
| 291 | this._maybeDeletion.set(false); |
| 292 | } |
| 293 | |
| 294 | /** Resets the focus to the active cell element or grid element. */ |
| 295 | resetFocusEffect(): void { |
no test coverage detected