We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de77675 commit 485376dCopy full SHA for 485376d
src/cljs/xt_play/view.cljs
@@ -88,7 +88,10 @@
88
89
(defn- update-db-from-editor-refs [tx-refs]
90
(doseq [tx-ref @tx-refs]
91
- (rf/dispatch [::tx-batch/assoc (:id @tx-ref) :txs (get-value tx-ref)])))
+ (let [value (get-value tx-ref)]
92
+ (if (empty? value)
93
+ (rf/dispatch [::tx-batch/delete (:id @tx-ref)])
94
+ (rf/dispatch [::tx-batch/assoc (:id @tx-ref) :txs (get-value tx-ref)])))))
95
96
(defn- run-button [tx-refs]
97
(let [loading? (rf/subscribe [::run/loading?])
0 commit comments