From c7bee6696bf6683da7a0586eb7a34a3f98c31b29 Mon Sep 17 00:00:00 2001
From: Petr Kachanovsky
Date: Tue, 18 Mar 2025 09:22:12 +0200
Subject: [PATCH] fix: change disabled select all records checkbox appearance
---
.../spa/src/components/ResourceListTable.vue | 15 ++++++++++++---
dev-demo/resources/apartments.ts | 9 +--------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/adminforth/spa/src/components/ResourceListTable.vue b/adminforth/spa/src/components/ResourceListTable.vue
index 04930a848..c4e3b3e5b 100644
--- a/adminforth/spa/src/components/ResourceListTable.vue
+++ b/adminforth/spa/src/components/ResourceListTable.vue
@@ -21,7 +21,7 @@
@@ -416,7 +416,7 @@ async function selectAll(value) {
const totalPages = computed(() => Math.ceil(props.totalRows / props.pageSize));
const allFromThisPageChecked = computed(() => {
- if (!props.rows) return false;
+ if (!props.rows || !props.rows.length) return false;
return props.rows.every((r) => checkboxesInternal.value.includes(r._primaryKeyValue));
});
const ascArr = computed(() => sort.value.filter((s) => s.direction === 'asc').map((s) => s.field));
@@ -572,4 +572,13 @@ async function startCustomAction(actionId, row) {
}
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/dev-demo/resources/apartments.ts b/dev-demo/resources/apartments.ts
index 6ffb64592..2179ae98f 100644
--- a/dev-demo/resources/apartments.ts
+++ b/dev-demo/resources/apartments.ts
@@ -223,16 +223,9 @@ export default {
{
name: "room_sizes",
type: AdminForthDataTypes.JSON,
- // isArray: {
- // enabled: true,
- // itemType: AdminForthDataTypes.FLOAT,
- // },
isArray: {
enabled: true,
- itemType: AdminForthDataTypes.STRING,
- },
- foreignResource: {
- resourceId: "users",
+ itemType: AdminForthDataTypes.FLOAT,
},
},
{