Просмотр исходного кода

fix: wrong collapsable? check for blocks with tags

Tienson Qin 1 год назад
Родитель
Сommit
a2b4d8b892

+ 1 - 1
src/main/frontend/components/property.cljs

@@ -667,7 +667,7 @@
                                 (if (or root-block? page-configure?)
                                   false
                                   (let [eid (if (uuid? property-id) [:block/uuid property-id] property-id)]
-                                    (:hide? (:block/schema (db/entity eid))))))
+                                    (boolean (:hide? (:block/schema (db/entity eid)))))))
         property-hide-f (cond
                           config/publishing?
                           ;; Publishing is read only so hide all blank properties as they

+ 4 - 1
src/main/frontend/handler/editor.cljs

@@ -3446,7 +3446,10 @@
                     (seq (:block/properties block))
                     (not (db-pu/all-hidden-properties? (keys (:block/properties block)))))
                (and db-based? (seq tags)
-                    (some (fn [t] (seq (:properties (:block/schema t)))) tags))
+                    (some (fn [t]
+                            (let [properties (:properties (:block/schema t))]
+                              (and (seq properties)
+                                   (not (db-pu/all-hidden-properties? properties))))) tags))
                (and
                 (:outliner/block-title-collapse-enabled? (state/get-config))
                 (block-with-title? (:block/format block)