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

Method activationEffect

src/aria/private/grid/widget.ts:157–167  ·  view source on GitHub ↗

Side-effect executed whenever the widget activates. Runs in the write phase.

()

Source from the content-addressed store, hash-verified

155
156 /** Side-effect executed whenever the widget activates. Runs in the write phase. */
157 activationEffect(): void {
158 if (this.isActivated()) {
159 const event = this.lastActivateEvent();
160 this.inputs.onActivate?.(event);
161
162 // Only automatically redirect focus if explicit configuration was supplied.
163 if (this.inputs.focusTarget()) {
164 this.focus();
165 }
166 }
167 }
168
169 /** Side-effect executed whenever the widget deactivates. Runs in the write phase. */
170 deactivationEffect(): void {

Callers 1

constructorMethod · 0.80

Calls 2

focusMethod · 0.95
isActivatedMethod · 0.45

Tested by

no test coverage detected