MCPcopy Create free account
hub / github.com/angular/components / resetStateEffect

Method resetStateEffect

src/aria/private/grid/grid.ts:279–293  ·  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

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