Skip to content

Commit

Permalink
fix(Select): normalizedValue handling Object modelValue (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
smarroufin authored May 24, 2022
1 parent 06b07e2 commit e419d68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/components/forms/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit e419d68

Please sign in to comment.