Browse Source

fix: click expand remove collapse property

Weihua Lu 4 years ago
parent
commit
a149742153
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/frontend/components/block.cljs

+ 3 - 1
src/main/frontend/components/block.cljs

@@ -1111,7 +1111,9 @@
                    (when-not (and (not collapsed?) (not has-child?))
                      (if ref?
                        (swap! *ref-collapsed? not)
-                       (editor-handler/set-block-property! uuid :collapsed (not collapsed?)))))}
+                       (if collapsed?
+                         (editor-handler/expand-block! uuid)
+                         (editor-handler/collapse-block! uuid)))))}
       (cond
         (and control-show? collapsed?)
         (svg/caret-right)