Skip to content

Commit d63a366

Browse files
committed
fixup! fix(cdk-experimental/listbox): change shift+nav behavior
1 parent 004076c commit d63a366

File tree

1 file changed

+7
-7
lines changed
  • src/cdk-experimental/ui-patterns/listbox

1 file changed

+7
-7
lines changed

src/cdk-experimental/ui-patterns/listbox/listbox.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,33 +255,33 @@ export class ListboxPattern<V> {
255255

256256
/** Navigates to the first option in the listbox. */
257257
first(opts?: SelectOptions) {
258-
this.navigate(opts, () => this.navigation.first());
258+
this._navigate(opts, () => this.navigation.first());
259259
}
260260

261261
/** Navigates to the last option in the listbox. */
262262
last(opts?: SelectOptions) {
263-
this.navigate(opts, () => this.navigation.last());
263+
this._navigate(opts, () => this.navigation.last());
264264
}
265265

266266
/** Navigates to the next option in the listbox. */
267267
next(opts?: SelectOptions) {
268-
this.navigate(opts, () => this.navigation.next());
268+
this._navigate(opts, () => this.navigation.next());
269269
}
270270

271271
/** Navigates to the previous option in the listbox. */
272272
prev(opts?: SelectOptions) {
273-
this.navigate(opts, () => this.navigation.prev());
273+
this._navigate(opts, () => this.navigation.prev());
274274
}
275275

276276
/** Navigates to the given item in the listbox. */
277277
goto(event: PointerEvent, opts?: SelectOptions) {
278278
const item = this._getItem(event);
279-
this.navigate(opts, () => this.navigation.goto(item));
279+
this._navigate(opts, () => this.navigation.goto(item));
280280
}
281281

282282
/** Handles typeahead search navigation for the listbox. */
283283
search(char: string, opts?: SelectOptions) {
284-
this.navigate(opts, () => this.typeahead.search(char));
284+
this._navigate(opts, () => this.typeahead.search(char));
285285
}
286286

287287
/**
@@ -293,7 +293,7 @@ export class ListboxPattern<V> {
293293
* Handles boilerplate calling of focus & selection operations. Also ensures these
294294
* additional operations are only called if the navigation operation moved focus to a new option.
295295
*/
296-
private navigate(opts: SelectOptions = {}, operation: () => boolean) {
296+
private _navigate(opts: SelectOptions = {}, operation: () => boolean) {
297297
if (opts?.selectRange) {
298298
this.wrap.set(false);
299299
this.selection.rangeStartIndex.set(this.anchorIndex());

0 commit comments

Comments
 (0)