Commit 56bb5e50 authored by Heinz N. Gies's avatar Heinz N. Gies

More graceful handling of removed values

parent adb9faee
......@@ -78,7 +78,9 @@
view-path v)]
(om/update! data view-path v)
(if key
(om/update! data data-path dv))
(if (nil? dv)
(om/transact! data (butlast data-path) (fn [ds] (dissoc ds key)))
(om/update! data data-path dv)))
(validate-data! data' spec))]
(if (and default (nil? val))
(do
......
......@@ -406,7 +406,7 @@
"docker" {:key 5 :title "Docker" :fn #(om/build render-docker %1 {:opts {:id (:uuid %2)}})}
"metadata" {:key 6 :title "Metadata"
:fn #(om/build metadata/render
(:metadata %2) {:opts {:root "orgs" :uuid (:uuid %2)}} %2)}})
(:metadata %2) {:opts {:root "vmorgs" :uuid (:uuid %2)}})}})
(def render
(view/make
......
......@@ -233,8 +233,7 @@
om/IRenderState
(render-state [_ state]
(let [tab (get-in data [:key] 1)
mkopts (partial mkopts data)
]
mkopts (partial mkopts data)]
(g/grid
{:id "vm-create-grid" :class "vms-create"}
(g/row
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment