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

Method _groupPrev

src/aria/private/toolbar/toolbar.ts:119–138  ·  view source on GitHub ↗

Navigates to the previous widget in a widget group.

()

Source from the content-addressed store, hash-verified

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