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

Method _groupPrev

src/aria/private/toolbar/toolbar.ts:120–139  ·  view source on GitHub ↗

Navigates to the previous widget in a widget group.

()

Source from the content-addressed store, hash-verified

118
119 /** Navigates to the previous widget in a widget group. */
120 private _groupPrev() {
121 const currGroup = this.inputs.activeItem()?.group();
122 const nextGroup = this.listBehavior.navigationBehavior.peekPrev()?.group();
123
124 if (!currGroup) {
125 return;
126 }
127
128 if (currGroup !== nextGroup) {
129 this.listBehavior.goto(
130 this.listBehavior.navigationBehavior.peekLast({
131 items: currGroup.inputs.items(),
132 })!,
133 );
134
135 return;
136 }
137
138 this.listBehavior.prev();
139 }
140
141 /** Navigates to the widget targeted by a pointer event. */
142 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