forked from AkkomaGang/admin-fe
Use boolean value if value is 'true' of 'false' in select inputs with reduced labels
This commit is contained in:
parent
4404e87e3d
commit
7d6fc796de
1 changed files with 6 additions and 3 deletions
|
@ -13,7 +13,7 @@
|
|||
</el-select>
|
||||
<el-select
|
||||
v-if="setting.type === 'module' || (setting.type.includes('atom') && setting.type.includes('dropdown'))"
|
||||
:value="inputValue"
|
||||
:value="inputValue === false ? 'false' : inputValue"
|
||||
:data-search="setting.key || setting.group"
|
||||
clearable
|
||||
class="input"
|
||||
|
@ -28,6 +28,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getBooleanValue } from '@/store/modules/normalizers'
|
||||
|
||||
export default {
|
||||
name: 'SelectInputWithReducedLabels',
|
||||
props: {
|
||||
|
@ -107,8 +109,9 @@ export default {
|
|||
})
|
||||
},
|
||||
updateSetting(value, group, key, input, type) {
|
||||
this.$store.dispatch('UpdateSettings', { group, key, input, value, type })
|
||||
this.$store.dispatch('UpdateState', { group, key, input, value })
|
||||
const updatedValue = getBooleanValue(value)
|
||||
this.$store.dispatch('UpdateSettings', { group, key, input, value: updatedValue, type })
|
||||
this.$store.dispatch('UpdateState', { group, key, input, value: updatedValue })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue