Skip to content

Commit 9035191

Browse files
author
Pooya Parsa
committed
Fix form-select default option
1 parent 6742d4c commit 9035191

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

components/form-select.vue

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
2-
<b-form-fieldset :state="state" :layout="layout" :label="label" :description="description" :feedback="feedback" :id="id">
2+
<b-form-fieldset :state="state" :layout="layout" :label="label" :description="description" :feedback="feedback"
3+
:id="id">
34

45
<select :class="['custom-select',inputSize]"
56
:id="id"
@@ -29,7 +30,8 @@
2930
}
3031
},
3132
mounted(){
32-
this.change(this.selected);
33+
if (this.selected)
34+
this.change(this.selected);
3335
},
3436
computed: {
3537
allOptions(){
@@ -50,6 +52,7 @@
5052
},
5153
defaultOption: {
5254
default: () => {
55+
return {}
5356
},
5457
},
5558
value: {
@@ -59,15 +62,15 @@
5962
type: String,
6063
default: ''
6164
},
62-
disabled:{
63-
type:Boolean,
64-
default:false
65+
disabled: {
66+
type: Boolean,
67+
default: false
6568
},
6669
6770
// FIELD SET
6871
layout: {
69-
type: String,
70-
default: null
72+
type: String,
73+
default: null
7174
},
7275
state: {
7376
type: String,

0 commit comments

Comments
 (0)