Skip to content

Commit

Permalink
fix: display selected values as chips in KSelectField (closes #951)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Dec 1, 2024
1 parent f7c597d commit 80510cb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions core/client/components/form/KSelectField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
v-model="model"
:label="label"
:multiple="multiple"
:toggle="toggle"
:radio="radio"
:use-chips="chips"
:options="options"
emit-value
map-options
Expand All @@ -40,7 +37,12 @@
</template>
<!-- selected item display -->
<template v-slot:selected-item="scope">
<span :class="selectedClass()">
<q-chip v-if="chips">
<span :class="selectedClass()">
{{ scope.opt.label }}
</span>
</q-chip>
<span v-else :class="selectedClass()">
{{ scope.opt.label }}
</span>
</template>
Expand Down Expand Up @@ -75,12 +77,6 @@ export default {
clearable () {
return _.get(this.properties, 'field.clearable', true)
},
toggle () {
return _.get(this.properties, 'field.toggle', false)
},
radio () {
return _.get(this.properties, 'field.radio', false)
},
chips () {
return _.get(this.properties, 'field.chips', false)
},
Expand Down

0 comments on commit 80510cb

Please sign in to comment.