Make expansion of each data component independent
This commit is contained in:
parent
eac8b85952
commit
0f8adeeab5
|
@ -223,6 +223,7 @@
|
|||
:style {:margin (css-join pad-padding pad-padding "0px" pad-padding)}
|
||||
:children [[components/simple-render
|
||||
(get-in @app-db-after path)
|
||||
["app-db-path" path]
|
||||
|
||||
#_{:todos [1 2 3]}
|
||||
#_(get-in @app-db path)
|
||||
|
@ -256,7 +257,8 @@
|
|||
[rc/v-box
|
||||
:class "data-viewer"
|
||||
:children [[components/simple-render
|
||||
diff-before]]]
|
||||
diff-before
|
||||
["app-db-diff" path]]]]
|
||||
|
||||
^{:key "only-after"}
|
||||
[rc/v-box
|
||||
|
@ -273,7 +275,8 @@
|
|||
[rc/v-box
|
||||
:class "data-viewer"
|
||||
:children [[components/simple-render
|
||||
diff-after]]]))
|
||||
diff-after
|
||||
["app-db-diff" path]]]]))
|
||||
(when open?
|
||||
[rc/gap-f :size pad-padding])]]))
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
(nil? data))) [:div {:style {:margin "10px 0"}} (prn-str data)]
|
||||
@expanded? (jsonml->hiccup (cljs-devtools-header data) (conj path 0)))]])))
|
||||
|
||||
(defn simple-render [data]
|
||||
(defn simple-render [data path]
|
||||
(let [expanded? (r/atom true) #_(rf/subscribe [:app-db/node-expanded? path])]
|
||||
(fn [data]
|
||||
[:div
|
||||
|
|
|
@ -190,7 +190,8 @@
|
|||
:padding common/gs-7s
|
||||
:margin (css-join pad-padding pad-padding "0px" pad-padding)}
|
||||
:children [[components/simple-render
|
||||
(:value pod-info)]]])
|
||||
(:value pod-info)
|
||||
["sub-path" path]]]])
|
||||
(when (and open? diff?)
|
||||
[rc/v-box
|
||||
:height common/gs-19s
|
||||
|
|
Loading…
Reference in New Issue