mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [select] ensure scrollbar syncs when scrolling to selected option (#19636)
* fix: ensure scrollbar syncs when scrolling to selected option * feat: update scrollbar when drop-down menu is displayed
This commit is contained in:
@@ -708,7 +708,10 @@ export const useSelect: useSelectType = (props: ISelectProps, emit) => {
|
||||
|
||||
const handleMenuEnter = () => {
|
||||
states.isBeforeHide = false
|
||||
nextTick(() => scrollToOption(states.selected))
|
||||
nextTick(() => {
|
||||
scrollbarRef.value?.update()
|
||||
scrollToOption(states.selected)
|
||||
})
|
||||
}
|
||||
|
||||
const focus = () => {
|
||||
|
||||
Reference in New Issue
Block a user