From 285223145bfeff8d8fd5b761fd47e03654731e09 Mon Sep 17 00:00:00 2001 From: Michel Succar Date: Wed, 3 Apr 2024 16:52:04 +0200 Subject: [PATCH 1/3] Sticky participants for answers and participants grids --- newdle/client/src/components/GridCommon.module.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/newdle/client/src/components/GridCommon.module.scss b/newdle/client/src/components/GridCommon.module.scss index 44b2b313..0285b2b4 100644 --- a/newdle/client/src/components/GridCommon.module.scss +++ b/newdle/client/src/components/GridCommon.module.scss @@ -40,6 +40,19 @@ overflow-x: auto; max-width: max-content; + th:first-child { + position: sticky !important; + left: 0; + z-index: 1; + } + + tr:not(.spacer) td:first-child { + position: sticky !important; + left: 0; + z-index: 1; + background-color: #ffffff; + } + td.avatar-cell { white-space: nowrap; padding-left: 1em; From 770524ad2afb11378493ea9d3a59331d70653106 Mon Sep 17 00:00:00 2001 From: Michel Succar Date: Fri, 5 Apr 2024 17:17:45 +0200 Subject: [PATCH 2/3] Make table scrollable for a sticky header/footer --- .../client/src/components/GridCommon.module.scss | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/newdle/client/src/components/GridCommon.module.scss b/newdle/client/src/components/GridCommon.module.scss index 0285b2b4..d28cc9e4 100644 --- a/newdle/client/src/components/GridCommon.module.scss +++ b/newdle/client/src/components/GridCommon.module.scss @@ -39,11 +39,24 @@ .answer-grid { overflow-x: auto; max-width: max-content; + max-height: 580px; + + thead tr > th { + position: sticky !important; + top: 0; + z-index: 1; + } + + tfoot tr > th { + position: sticky !important; + bottom: 0; + z-index: 1; + } th:first-child { position: sticky !important; left: 0; - z-index: 1; + z-index: 2; } tr:not(.spacer) td:first-child { From 7619747e6e5bbbff55d1267a4f74f576f368b041 Mon Sep 17 00:00:00 2001 From: Michel Succar Date: Tue, 9 Apr 2024 17:03:26 +0200 Subject: [PATCH 3/3] Fix table overflow --- newdle/client/src/components/GridCommon.module.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/newdle/client/src/components/GridCommon.module.scss b/newdle/client/src/components/GridCommon.module.scss index d28cc9e4..11d66a38 100644 --- a/newdle/client/src/components/GridCommon.module.scss +++ b/newdle/client/src/components/GridCommon.module.scss @@ -39,7 +39,12 @@ .answer-grid { overflow-x: auto; max-width: max-content; - max-height: 580px; + + table { + display: block; + max-height: 580px; + overflow-y: scroll; + } thead tr > th { position: sticky !important; @@ -126,7 +131,7 @@ thead th.hover, tfoot th.hover { - background: rgba(0, 0, 0, 0.05); + background: #f2f2f2; color: rgba(0, 0, 0, 0.95); }