mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
enhance: block expand/collapse toggle
1. Display `Expand all` where there're already collapsed blocks. This applies to `Collapse all` too. 2. Make the guideline bold when hovering on it. 3. Simplify some logic
This commit is contained in:
@@ -1351,9 +1351,10 @@
|
||||
(defn- toggle-block-children
|
||||
[e children]
|
||||
(let [block-ids (map :block/uuid children)]
|
||||
(if (some editor-handler/collapsable? block-ids)
|
||||
(dorun (map editor-handler/collapse-block! block-ids))
|
||||
(dorun (map editor-handler/expand-block! block-ids)))))
|
||||
(dorun
|
||||
(if (some editor-handler/collapsable? block-ids)
|
||||
(map editor-handler/collapse-block! block-ids)
|
||||
(map editor-handler/expand-block! block-ids)))))
|
||||
|
||||
(rum/defc block-children < rum/reactive
|
||||
[config children collapsed? *ref-collapsed?]
|
||||
|
||||
Reference in New Issue
Block a user