Skip to content

Commit

Permalink
Make too wide tables on mobile horizontal scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
madis committed Dec 16, 2024
1 parent 3b627f9 commit 4d2c094
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ui/src/ethlance/ui/component/scrollable.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@
(fn [_ child]
[:div.scrollable {:ref react-ref} child])})))

(defn- c-scrollable-css
[& [opts body]]
[:div {:style {:overflow-x "auto"}} (or body opts)])

(defn c-scrollable
[opts val]
(let [use-noop true] ; Using noop implementation until can make the simplebar work
(if use-noop
(c-scrollable-noop opts val)
(let [alternative-implementation true] ; Using basic CSS implementation to make wide tables scroll horizontally
(if alternative-implementation
(c-scrollable-css opts val)
(c-scrollable-real opts val))))
1 change: 0 additions & 1 deletion ui/src/ethlance/ui/page/job_detail.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@
[:div.proposal-listing
[:div.label "Arbitrations"]
[c-scrollable
{:forceVisible true :autoHide false}
(into [c-table {:headers ["" "Arbiter" "Rate" "Accepted at" "Status" ""]}]
(map (fn [arbitration]
[[:span (cond
Expand Down

0 comments on commit 4d2c094

Please sign in to comment.