浏览代码

fix: click expand remove collapse property

Weihua Lu 4 年之前
父节点
当前提交
a149742153
共有 1 个文件被更改,包括 3 次插入1 次删除
  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)