From 66d2689ea2693b33c35653a35d3897a644ec6f1a Mon Sep 17 00:00:00 2001 From: Kaken Bok Date: Sat, 23 Nov 2024 23:41:00 +0100 Subject: [PATCH] listview.deselectAll --- src-admin/components/list/ListView.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src-admin/components/list/ListView.vue b/src-admin/components/list/ListView.vue index c264a3d..2be0db2 100644 --- a/src-admin/components/list/ListView.vue +++ b/src-admin/components/list/ListView.vue @@ -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) @@ -220,8 +225,7 @@ export default class ListView extends Mixins(ListViewMixin) { } _listLoaded () { - this.selectedModels = [] - this.$emit('update:selectedModels', this.selectedModels) + this.deselectAll() } @Watch('isLoading')