From 04da2dffc46332a3fffeaebf3945d94f41ba302d Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 4 Mar 2024 13:41:54 +0100 Subject: [PATCH] Fix folders cards [SCI-10255][SCI-10332] --- app/javascript/vue/projects/card.vue | 36 ++++++++++++------- app/javascript/vue/shared/datatable/table.vue | 9 +++-- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/app/javascript/vue/projects/card.vue b/app/javascript/vue/projects/card.vue index bddf570f3..7145d1086 100644 --- a/app/javascript/vue/projects/card.vue +++ b/app/javascript/vue/projects/card.vue @@ -36,8 +36,14 @@ -
-
+
+
-
- -
- - - {{ params.name }} - -
- {{ params.folder_info }} +
+ + + {{ params.name }} + +
+ {{ params.folder_info }} +
diff --git a/app/javascript/vue/shared/datatable/table.vue b/app/javascript/vue/shared/datatable/table.vue index 990785ac3..c3e4f479b 100644 --- a/app/javascript/vue/shared/datatable/table.vue +++ b/app/javascript/vue/shared/datatable/table.vue @@ -217,7 +217,7 @@ export default { dtComponent: this }, pinned: (column.field === 'name' ? 'left' : null), - comparator: () => false + comparator: () => null })); if (this.withCheckboxes) { @@ -308,6 +308,9 @@ export default { } else { target = document.querySelector('.ag-body-viewport'); } + + if (!target) return; + if (target.scrollTop + target.clientHeight >= target.scrollHeight - 50) { if (this.dataLoading || this.lastPage) return; @@ -365,7 +368,9 @@ export default { }); setTimeout(() => { - this.gridApi.refreshHeader(); + if (this.gridApi) { + this.gridApi.refreshHeader(); + } this.initializing = false; }, 200); },