From adcf5148a6788027c316ca11d4c4523fd36c439e Mon Sep 17 00:00:00 2001 From: Kai Kapalla Date: Mon, 17 Jun 2019 12:58:52 +0200 Subject: [PATCH] fixes: checkbox problem #525 in next branch --- src/components/VuetableFieldCheckboxMixin.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/VuetableFieldCheckboxMixin.vue b/src/components/VuetableFieldCheckboxMixin.vue index e6d698ab..95aab807 100644 --- a/src/components/VuetableFieldCheckboxMixin.vue +++ b/src/components/VuetableFieldCheckboxMixin.vue @@ -18,7 +18,7 @@ export default { }, isAllItemsInCurrentPageSelected() { - if (! this.vuetable.tableData) return + if (! this.vuetable.tableData) return let idColumn = this.vuetable.trackBy let checkbox = this.$el.querySelector('input[type=checkbox]') @@ -29,16 +29,16 @@ export default { checkbox.indeterminate = false return false } - // count > 0 and count < perPage, set checkbox state to 'indeterminate' - else if (selected.length < this.vuetable.perPage) { + // count > 0 and count < total available, set checkbox state to 'indeterminate' + else if (selected.length < this.vuetable.tableData.length) { checkbox.indeterminate = true return true } - // count == perPage, set checkbox state to 'checked' + // count == total available, set checkbox state to 'checked' else { checkbox.indeterminate = false return true - } + } } } }