Skip to content

Commit

Permalink
fix(combobox): Fix error when typing a custom value and then trying t…
Browse files Browse the repository at this point in the history
…o open the menu. #5109
  • Loading branch information
driskull committed Dec 16, 2022
1 parent bd7e8da commit 9841889
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/combobox/combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,11 @@ export class Combobox

private scrollToActiveItem = (): void => {
const activeItem = this.filteredItems[this.activeItemIndex];

if (!activeItem) {
return;
}

const height = this.calculateSingleItemHeight(activeItem);
const { offsetHeight, scrollTop } = this.listContainerEl;
if (offsetHeight + scrollTop < activeItem.offsetTop + height) {
Expand Down

0 comments on commit 9841889

Please sign in to comment.