Skip to content

Commit

Permalink
listview.deselectAll
Browse files Browse the repository at this point in the history
  • Loading branch information
kakenbok committed Nov 23, 2024
1 parent 251047f commit 66d2689
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src-admin/components/list/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ export default class ListView extends Mixins(ListViewMixin) {
return this.selectedModels.includes(model)
}
deselectAll () {
this.selectedModels = []
this.$emit('update:selectedModels', this.selectedModels)
}
selectModel (model) {
if (!this.isSelected(model)) {
this.selectedModels.push(model)
Expand All @@ -220,8 +225,7 @@ export default class ListView extends Mixins(ListViewMixin) {
}
_listLoaded () {
this.selectedModels = []
this.$emit('update:selectedModels', this.selectedModels)
this.deselectAll()
}
@Watch('isLoading')
Expand Down

0 comments on commit 66d2689

Please sign in to comment.