Skip to content

Commit

Permalink
feat(light): add clearable
Browse files Browse the repository at this point in the history
BREAKING CHANGE: force major release
  • Loading branch information
abichinger committed Nov 6, 2023
1 parent 3ea62ba commit b9ca4e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions light/src/CronEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
:cols="cols[f.id] || 1"
:selection="f.text.value"
multiple
clearable
></custom-select>
</div>
<span>{{ f.suffix.value }}</span>
Expand Down
6 changes: 6 additions & 0 deletions light/src/components/CustomSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<div class="vcron-select-container">
<span class="vcron-select-input" @click="toggleMenu">
{{ selection ?? selectedStr }}

<span v-if="clearable && !isEmpty" @click="clear">&#x2715;</span>
</span>

<div class="vcron-select-list" v-if="menu">
Expand Down Expand Up @@ -35,6 +37,10 @@ export default {
selection: {
type: String,
},
clearable: {
type: Boolean,
default: false,
},
},
emits: ['update:model-value'],
setup(props, { emit }) {
Expand Down

0 comments on commit b9ca4e2

Please sign in to comment.