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

Method activationEffect

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

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

()

Source from the content-addressed store, hash-verified

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

Callers 1

constructorMethod · 0.80

Calls 2

focusMethod · 0.95
isActivatedMethod · 0.45

Tested by

no test coverage detected