fix(Select): normalizedValue handling Object modelValue (#59)

This commit is contained in:
Sylvain Marroufin
2022-05-24 10:59:27 +02:00
committed by GitHub
parent 06b07e292e
commit e419d68f64

View File

@@ -167,12 +167,13 @@ const normalizedOptionsWithPlaceholder = computed(() => {
})
const normalizedValue = computed(() => {
const foundOption = normalizedOptionsWithPlaceholder.value.find(option => option.value === props.modelValue)
const normalizeModelValue = normalizeOption(props.modelValue)
const foundOption = normalizedOptionsWithPlaceholder.value.find(option => option[props.valueAttribute] === normalizeModelValue[props.valueAttribute])
if (!foundOption) {
return ''
}
return foundOption.value
return foundOption[props.valueAttribute]
})
const selectClass = computed(() => {