Skip to content

Commit

Permalink
fix(select#4437): use correct ref (#4444)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem authored Dec 25, 2024
1 parent bd4e519 commit 4151e43
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,14 @@ const focusNextOption = () => {
const focusFirstOption = () => updateFocusedOption(findNextActiveOption(0))
const { itemRefs, setItemRef } = useObjectRefs()
const virtualScrollerRef = shallowRef<Array<ComponentPublicInstance>>()
const virtualScrollerRef = shallowRef<ComponentPublicInstance>()
const scrollToOption = (option: SelectOption) => {
if (!isValueExists(option)) { return }
const element = unwrapEl(itemRefs.value[getTrackBy(option)])
if (element) { scrollToElement(element) }
const virtualScroller = virtualScrollerRef.value?.[0]
const virtualScroller = virtualScrollerRef.value
if (props.virtualScroller) { (virtualScroller as any).virtualScrollTo(currentOptionIndex.value) }
}
Expand Down

0 comments on commit 4151e43

Please sign in to comment.