fix: copy paste nested blocks

Related to LOG-3160
experiment/tanstack-table
Tienson Qin 2024-06-21 11:02:21 +08:00
parent 73757c0f21
commit bd95e38e09
1 changed files with 5 additions and 1 deletions

View File

@ -820,7 +820,11 @@
#?(:cljs
(defn copy-to-clipboard!
[text & {:keys [graph html blocks owner-window]}]
(let [blocks (map (fn [block] (if (de/entity? block) (into {} block) block)) blocks)
(let [blocks (map (fn [block] (if (de/entity? block)
(-> (into {} block)
;; FIXME: why :db/id is not included?
(assoc :db/id (:db/id block)))
block)) blocks)
data (clj->js
(common-util/remove-nils-non-nested
{:text text