Skip to content

Commit

Permalink
Fix blank page after number of tabs reduces on re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
madis committed Nov 25, 2024
1 parent 89dc2c5 commit 167feda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/ethlance/ui/component/tabular_layout.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
tab-options (map-indexed #(-> %2 first (assoc :index %1)) tab-parts)
tab-children (mapv second tab-parts)
tab-count-class (str "tab-count-" (count tab-children))]
(when (>= @*active-tab-index (count tab-parts))
(reset! *active-tab-index (or default-tab 0)))
[:div.tabular-layout opts
[:div.tab-listing
{:class tab-count-class}
Expand Down

0 comments on commit 167feda

Please sign in to comment.