fix: select always trigger first active (#3869)

pull/3884/head
zkwolf 2021-03-28 20:26:27 +08:00 committed by GitHub
parent a8b54e8512
commit ad3aaec3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ const OptionList = defineComponent<OptionListProps, { state?: any }>({
if (!props.multiple && props.open && props.values.size === 1) {
const value = Array.from(props.values)[0];
const index = props.flattenOptions.findIndex(({ data }) => data.value === value);
// setActive(index);
setActive(index);
scrollIntoView(index);
}
// Force trigger scrollbar visible when open