MCPcopy
hub / github.com/angular/components / resetStateEffect

Method resetStateEffect

src/aria/private/grid/grid.ts:278–292  ·  view source on GitHub ↗

Resets the active state of the grid if it is empty or stale.

()

Source from the content-addressed store, hash-verified

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 {

Callers 2

constructorMethod · 0.80
grid.spec.tsFile · 0.80

Calls 2

resetStateMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected