cleaned up how these are generated.

This commit is contained in:
2022-07-25 05:15:16 -07:00
parent bc07ad8f01
commit f6f73a6110
7 changed files with 122 additions and 117 deletions

View File

@@ -6,7 +6,8 @@
[re-frame.core :as re-frame]
[auto-ap.views.pages.data-page :as data-page]
[auto-ap.views.components.buttons :as buttons]
[auto-ap.subs :as subs]))
[auto-ap.subs :as subs]
[react-dom :as react-dom]))
(set! *warn-on-infer* true)
(defonce ^js/React.Context grid-context ( react/createContext "default"))
@@ -116,7 +117,7 @@
[:a.tag.is-medium.is-delete {:on-click (fn []
(on-change {:sort (filter #(not= sort-key (:sort-key %)) sort)}))}]]])])
(defn controls [{:keys [start end count total per-page] :as para}]
(defn controls [{:keys [start end count total per-page action-buttons] :as para}]
(let [children (r/children (r/current-component))]
[:> Consumer {}
(fn [consume]
@@ -134,7 +135,8 @@
[sort-by-list {:sort (:sort params)
:on-change on-params-change}]]]
(mapv (fn [c]
[:div.level-item c]) children))]]))))]))
[:div.level-item c]) children))
[:div.level-right action-buttons]]]))))]))
(defn table [{:keys [fullwidth class style]}]