Skip to content

Commit

Permalink
[nested-grid] Add parts prop
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed May 19, 2024
1 parent cbb0d4c commit d7cd10e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/re_com/nested_grid.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@
column-width column-header-height row-header-width row-height
show-export-button? on-export
on-export-cell on-export-column-header on-export-row-header
theme parts
show-selection-box?]
:or {column-header-height 30
column-width 60
Expand All @@ -584,7 +585,7 @@
show-selection-box? false
on-export-column-header header-label
on-export-row-header header-label}}]
(let [theme {}
(let [theme {:user [theme (theme/parts parts)]}
themed (fn [part props] (theme/apply props {:part part} theme))
column-paths (spec->headers* column-tree)
column-leaf-paths (leaf-paths column-paths)
Expand Down Expand Up @@ -791,7 +792,8 @@
row-path showing-row-paths
:let [props {:column-path column-path
:row-path row-path
:cell cell}]]
:cell cell
:theme theme}]]
^{:key [::cell (or [column-path row-path] (gensym))]}
[u/part cell-wrapper props cell-wrapper-part]))
zebra-stripes (for [i (filter even? (range 1 (inc (count row-paths))))]
Expand Down

0 comments on commit d7cd10e

Please sign in to comment.