Skip to content

Commit 3ca5209

Browse files
xiaojieajie隆杰
and
隆杰
authored
fix: select auto location (#5843)
* fix: select auto location * fix: 3 Altitude location errors may occur Co-authored-by: 隆杰 <[email protected]>
1 parent b9000c8 commit 3ca5209

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/vc-select/OptionList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const OptionList = defineComponent({
115115
if (!baseProps.multiple && baseProps.open && props.rawValues.size === 1) {
116116
const value = Array.from(props.rawValues)[0];
117117
const index = toRaw(memoFlattenOptions.value).findIndex(
118-
({ data }) => data.value === value,
118+
({ data }) => data[props.fieldNames.value] === value,
119119
);
120120
if (index !== -1) {
121121
setActive(index);

components/vc-virtual-list/hooks/useScrollTo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default function useScrollTo(
106106
});
107107
};
108108

109-
syncScroll(3);
109+
syncScroll(5);
110110
}
111111
};
112112
}

0 commit comments

Comments
 (0)