From eb0043914bc832be57e1af6def72574a86c76339 Mon Sep 17 00:00:00 2001 From: Sylvain Marroufin Date: Thu, 17 Mar 2022 15:39:09 +0100 Subject: [PATCH] fix(Select): default value handling --- src/runtime/components/forms/Select.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/components/forms/Select.vue b/src/runtime/components/forms/Select.vue index aa08513a81..02eaec743f 100644 --- a/src/runtime/components/forms/Select.vue +++ b/src/runtime/components/forms/Select.vue @@ -21,7 +21,7 @@ :key="`${childOption[valueAttribute]}-${index}-${index2}`" :value="childOption[valueAttribute]" :selected="childOption[valueAttribute] === normalizedValue" - :disabled="option.disabled" + :disabled="childOption.disabled" v-text="childOption[textAttribute]" /> @@ -156,7 +156,7 @@ export default { return [ { - [props.valueAttribute]: null, + [props.valueAttribute]: '', [props.textAttribute]: props.placeholder, disabled: true }, @@ -167,7 +167,7 @@ export default { const normalizedValue = computed(() => { const foundOption = normalizedOptionsWithPlaceholder.value.find(option => option.value === props.modelValue) if (!foundOption) { - return null + return '' } return foundOption.value