fix: select always trigger first active (#3869)
parent
a8b54e8512
commit
ad3aaec3ca
|
@ -141,7 +141,7 @@ const OptionList = defineComponent<OptionListProps, { state?: any }>({
|
||||||
if (!props.multiple && props.open && props.values.size === 1) {
|
if (!props.multiple && props.open && props.values.size === 1) {
|
||||||
const value = Array.from(props.values)[0];
|
const value = Array.from(props.values)[0];
|
||||||
const index = props.flattenOptions.findIndex(({ data }) => data.value === value);
|
const index = props.flattenOptions.findIndex(({ data }) => data.value === value);
|
||||||
// setActive(index);
|
setActive(index);
|
||||||
scrollIntoView(index);
|
scrollIntoView(index);
|
||||||
}
|
}
|
||||||
// Force trigger scrollbar visible when open
|
// Force trigger scrollbar visible when open
|
||||||
|
|
Loading…
Reference in New Issue