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

Method _groupPrev

src/aria/private/toolbar/toolbar.ts:155–174  ·  view source on GitHub ↗

Navigates to the previous widget in a widget group.

()

Source from the content-addressed store, hash-verified

153
154 /** Navigates to the previous widget in a widget group. */
155 private _groupPrev() {
156 const currGroup = this.inputs.activeItem()?.group();
157 const nextGroup = this.navigationBehavior.peekPrev()?.group();
158
159 if (!currGroup) {
160 return;
161 }
162
163 if (currGroup !== nextGroup) {
164 this.navigationBehavior.goto(
165 this.navigationBehavior.peekLast({
166 items: currGroup.inputs.items(),
167 })!,
168 );
169
170 return;
171 }
172
173 this.navigationBehavior.prev();
174 }
175
176 /** Navigates to the widget targeted by a pointer event. */
177 private _goto(e: MouseEvent) {

Callers 1

ToolbarPatternClass · 0.95

Calls 5

activeItemMethod · 0.80
peekPrevMethod · 0.80
gotoMethod · 0.45
peekLastMethod · 0.45
prevMethod · 0.45

Tested by

no test coverage detected