Skip to content

Commit 7db9935

Browse files
committed
fix: invalid multi-select selected options order
1 parent ec24513 commit 7db9935

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Select.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const filteredOptions = computed(() => {
128128
129129
const selectedOptions = computed(() => {
130130
if (props.isMulti) {
131-
return props.options.filter((option) => (selected.value as string[]).includes(option.value));
131+
return (selected.value as string[]).map((value) => props.options.find((option) => option.value === value)!);
132132
}
133133
134134
const found = props.options.find((option) => option.value === selected.value);

0 commit comments

Comments
 (0)