Selaa lähdekoodia

fix(ui): sticky columns for the pin table header

charlie 7 kuukautta sitten
vanhempi
sitoutus
a51b26c161

+ 1 - 1
deps/shui/src/logseq/shui/table/core.cljc

@@ -201,7 +201,7 @@
                ^js page-el (.closest target ".page-inner")
                *ticking? (volatile! false)
                *el-top (volatile! (-> target (.getBoundingClientRect) (.-top)))
-               head-height (-> (get-head-container) (js/getComputedStyle) (.-height) (js/parseInt))
+               head-height (-> (get-head-container) (.-offsetHeight))
                update-target-top! (fn []
                                     (when (not (.contains target-cls "ls-fixed"))
                                       (vreset! *el-top (+ (-> target (.getBoundingClientRect) (.-top))

+ 3 - 4
src/main/frontend/components/table.css

@@ -53,7 +53,8 @@
       @apply fixed overflow-hidden;
 
       min-width: unset;
-      top: 40px !important;
+      /* default app head height */
+      top: 48px !important;
     }
 
     .ls-table-header-cell {
@@ -127,9 +128,7 @@ html.is-resizing-buf {
 }
 
 .sticky-columns {
-    @apply sticky left-0;
-    z-index: 99;
-    background-color: var(--lx-gray-01, var(--ls-primary-background-color, hsl(var(--background))));
+    @apply sticky left-0 z-[8] bg-gray-01;
 }
 
 .table-action-bar {