Browse Source

fix(gui-v2): mark checkbox as marked only if atleast one record exist

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3107/head
Pranav C 2 years ago
parent
commit
b728d1326e
  1. 2
      packages/nc-gui-v2/composables/useViewData.ts

2
packages/nc-gui-v2/composables/useViewData.ts

@ -44,7 +44,7 @@ export function useViewData(
const selectedAllRecords = computed({
get() {
return formattedData.value.every((row: Row) => row.rowMeta.selected)
return !!formattedData.value.length && formattedData.value.every((row: Row) => row.rowMeta.selected)
},
set(selected: boolean) {
formattedData.value.forEach((row: Row) => (row.rowMeta.selected = selected))

Loading…
Cancel
Save