Skip to content

Commit

Permalink
Merge pull request #15968 from primefaces/issue-15861
Browse files Browse the repository at this point in the history
Fixed #15861 - Component: picklist scrolls to top
  • Loading branch information
cetincakiroglu authored Jul 11, 2024
2 parents a88ce3d + ea09c80 commit fc669e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/picklist/picklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ export class PickList implements AfterViewChecked, AfterContentInit {
this.focused[listType === this.SOURCE_LIST ? 'sourceList' : 'targetList'] = true;

const sourceIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : selectedFirstItem ? findIndex : -1;
const filteredIndex = this.findIndexInList(this.source[sourceIndex], this.visibleOptionsSource);
const filteredIndex = ObjectUtils.isNotEmpty(this.visibleOptionsSource) ? this.findIndexInList(this.source[sourceIndex], this.visibleOptionsSource) : sourceIndex;

this.changeFocusedOptionIndex(filteredIndex, listType);
this.onFocus.emit(event);
Expand Down

0 comments on commit fc669e6

Please sign in to comment.