瀏覽代碼

fix: display built-in query title when collapsed? is true

Tienson Qin 2 年之前
父節點
當前提交
9d5458fc05
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/frontend/components/query.cljs

+ 2 - 1
src/main/frontend/components/query.cljs

@@ -216,6 +216,7 @@
                       (or
                        collapsed?
                        (:block/collapsed? current-block)))
+        built-in-collapsed? (and collapsed? built-in?)
         table? (or table-view?
                    (get-in current-block [:block/properties :query-table])
                    (and (string? query) (string/ends-with? (string/trim query) "table")))
@@ -228,7 +229,7 @@
                                (symbol? (gp-util/safe-read-string query)))
         not-grouped-by-page? (or table?
                                  (and (string? query) (string/includes? query "(by-page false)")))
-        result (when-not collapsed?'
+        result (when (or built-in-collapsed? (not collapsed?'))
                  (get-query-result state config *query-error *query-triggered? current-block-uuid q not-grouped-by-page?))
         query-time (:query-time (meta result))
         page-list? (and (seq result)