Skip to content

Commit

Permalink
[nested-grid] Use available viewport width when max-width is unset
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed May 15, 2024
1 parent 9b4522e commit 350b8a5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/re_com/nested_grid.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -833,16 +833,18 @@
:style
{:display "grid"
:grid-template-columns (grid-template [(px (apply + max-row-widths))
(px (cond->
(apply +
native-scrollbar-width
showing-column-widths)
max-width
(min
(parse-long
(str/replace max-width
"px"
"")))))])
(if-not max-width
"1fr"
(px (cond->
(apply +
native-scrollbar-width
showing-column-widths)
max-width
(min
(parse-long
(str/replace max-width
"px"
""))))))])
:grid-template-rows (grid-template ["20px" showing-column-widths
(px (apply + max-column-heights))
(px (apply +
Expand Down

0 comments on commit 350b8a5

Please sign in to comment.