Skip to content

Commit

Permalink
fixes: checkbox problem ratiw#525 in next branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Kapalla committed Jun 17, 2019
1 parent 143ea98 commit adcf514
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/VuetableFieldCheckboxMixin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]')
Expand All @@ -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
}
}
}
}
}
Expand Down

0 comments on commit adcf514

Please sign in to comment.