fix(Select): disable placeholder

This commit is contained in:
Benjamin Canac
2022-03-01 17:01:48 +01:00
parent 77372423d8
commit 7723704f79
2 changed files with 8 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
<select
:id="name"
:name="name"
:value="modelValue"
:required="required"
:disabled="disabled"
:class="selectClass"
@@ -20,6 +21,7 @@
:key="`${childOption[valueAttribute]}-${index}-${index2}`"
:value="childOption[valueAttribute]"
:selected="childOption[valueAttribute] === normalizedValue"
:disabled="option.disabled"
v-text="childOption[textAttribute]"
/>
</optgroup>
@@ -28,6 +30,7 @@
:key="`${option[valueAttribute]}-${index}`"
:value="option[valueAttribute]"
:selected="option[valueAttribute] === normalizedValue"
:disabled="option.disabled"
v-text="option[textAttribute]"
/>
</template>
@@ -154,7 +157,8 @@ export default {
return [
{
[props.valueAttribute]: null,
[props.textAttribute]: props.placeholder
[props.textAttribute]: props.placeholder,
disabled: true
},
...normalizedOptions.value
]