Skip to content

Commit

Permalink
Merge pull request #14342 from MichaelG824/issue-14339-picklist
Browse files Browse the repository at this point in the history
14339 - Picklist
  • Loading branch information
cetincakiroglu authored Dec 13, 2023
2 parents 4d6e817 + cccb939 commit 6bcc8b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/components/picklist/picklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1426,12 +1426,13 @@ export class PickList implements AfterViewChecked, AfterContentInit {

changeFocusedOptionIndex(index, listType) {
const items = this.getListItems(listType);
if (items?.length > 0) {
let order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;

let order = index >= items.length ? items.length - 1 : index < 0 ? 0 : index;

this.focusedOptionIndex = items[order].getAttribute('id');
this.focusedOption = this.getFocusedOption(order, listType);
this.scrollInView(items[order].getAttribute('id'), listType);
this.focusedOptionIndex = items[order].getAttribute('id');
this.focusedOption = this.getFocusedOption(order, listType);
this.scrollInView(items[order].getAttribute('id'), listType);
}
}

scrollInView(id, listType) {
Expand Down

0 comments on commit 6bcc8b8

Please sign in to comment.