From ad3aaec3cac626748c6d4c28ae9b30a41295ac5b Mon Sep 17 00:00:00 2001 From: zkwolf Date: Sun, 28 Mar 2021 20:26:27 +0800 Subject: [PATCH] fix: select always trigger first active (#3869) --- components/vc-select/OptionList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-select/OptionList.tsx b/components/vc-select/OptionList.tsx index 85f61bf4a..a9a188507 100644 --- a/components/vc-select/OptionList.tsx +++ b/components/vc-select/OptionList.tsx @@ -141,7 +141,7 @@ const OptionList = defineComponent({ 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