File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ const availableOptions = computed<GenericOption[]>(() => {
83
83
return props .isMulti ? getNonSelectedOptions (options ) : options ;
84
84
});
85
85
86
- const selectedOptions = computed (() => {
86
+ const selectedOptions = computed < GenericOption []> (() => {
87
87
if (props .isMulti ) {
88
88
if (! Array .isArray (selected .value )) {
89
89
if (! props .disableInvalidVModelWarn ) {
@@ -93,9 +93,9 @@ const selectedOptions = computed(() => {
93
93
return [];
94
94
}
95
95
96
- return selected .value . map (
97
- ( value ) => props .options .find ((option ) => option . value === value ) ! ,
98
- );
96
+ return selected .value
97
+ . map (( selectedValue ) => props .options .find ((option ) => props . getOptionValue ( option ) === selectedValue ))
98
+ . filter (( option ) => option !== undefined );
99
99
}
100
100
101
101
const found = props .options .find ((option ) => props .getOptionValue (option ) === selected .value );
You can’t perform that action at this time.
0 commit comments