@@ -569,7 +569,7 @@
:scoped-block-id scoped-block-id})]
(concat previous-blocks more))))
- ;; TODO: drag && drop, move blocks up/down
+ ;; TODO: expand | collapse, drag && drop, move blocks up/down
:else
nil)
@@ -130,7 +130,7 @@
pages (remove nil? pages)
pages (map (fn [page] (assoc page :block/uuid (db/new-block-id))) pages)
blocks (->> (remove nil? blocks)
- (map (fn [b] (dissoc b :block/title :block/body))))]
+ (map (fn [b] (dissoc b :block/title :block/body :block/level :block/children :block/meta))))]
[pages blocks])
(catch js/Error e
(log/error :exception e))))
@@ -125,7 +125,7 @@
"db should be satisfied outliner-tx-state?")
(let [m (-> (:data this)
(dissoc :block/children :block/meta :block/top? :block/bottom?
- :block/title :block/body)
+ :block/title :block/body :block/level)
(util/remove-nils))
m (if (state/enable-block-timestamps?) (block-with-timestamps m) m)
other-tx (:db/other-tx m)
@@ -48,7 +48,12 @@
#?(:cljs
(defn transact!
[txs opts]
- (let [txs (remove-nil-from-transaction txs)]
+ (let [txs (remove-nil-from-transaction txs)
+ txs (map (fn [m] (if (map? m)
+ (dissoc m
+ :block/children :block/meta :block/top? :block/bottom?
+ m)) txs)]
;; (util/pprint txs)
(when (and (seq txs)
(not (:skip-transact? opts)))