Skip to content

Commit

Permalink
Fix row-label sticky top position
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Oct 3, 2024
1 parent bab563a commit 2c07814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/re_com/nested_grid.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,8 @@
:header-spec (last path)
:show? show?
:sticky? sticky?
:column-header-total-height
column-header-total-height}
:sticky-top (cond-> column-header-total-height
(and sticky? show-export-button?) (+ 25))}
theme (update theme :user-variables
conj (theme/with-state state))
props (merge {:theme theme
Expand Down
6 changes: 2 additions & 4 deletions src/re_com/theme/default.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@
:height "100%"}))

(defmethod base ::nested-grid/row-header
[props {{:keys [sticky? column-header-total-height]} :state}]
[props {{:keys [sticky? sticky-top]} :state}]
(update props :style merge {:width "100%"
:text-overflow :ellipsis
:overflow :hidden
:position :sticky
:top column-header-total-height}
(when sticky? {:position :sticky
:top (+ 25 column-header-total-height)})))
:top sticky-top}))

(defmethod base ::nested-grid/column-header
[props {{:keys [sticky? row-header-total-width]} :state}]
Expand Down

0 comments on commit 2c07814

Please sign in to comment.