Skip to content

Commit

Permalink
Fixed #15861 - Component: picklist scrolls to top
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 5, 2024
1 parent be604c0 commit c0f904c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/picklist/picklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,8 @@ 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 c0f904c

Please sign in to comment.