mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
🐛 Fix can't collapse colors and typograhies groups when searching assets
This commit is contained in:
parent
a457f8baf5
commit
166b8c806c
2 changed files with 7 additions and 3 deletions
|
@ -264,8 +264,10 @@
|
|||
multi-colors? multi-assets? on-asset-click on-assets-delete
|
||||
on-clear-selection on-group on-rename-group on-ungroup colors
|
||||
selected-full]}]
|
||||
(let [group-open? (or ^boolean force-open?
|
||||
^boolean (get open-groups prefix (if (= prefix "") true false)))
|
||||
(let [group-open? (if (false? (get open-groups prefix)) ;; if the user has closed it specifically, respect that
|
||||
false
|
||||
(or ^boolean force-open?
|
||||
^boolean (get open-groups prefix (if (= prefix "") true false))))
|
||||
dragging* (mf/use-state false)
|
||||
dragging? (deref dragging*)
|
||||
|
||||
|
|
|
@ -128,7 +128,9 @@
|
|||
[{:keys [file-id prefix groups open-groups force-open? file local? selected local-data
|
||||
editing-id renaming-id on-asset-click handle-change apply-typography on-rename-group
|
||||
on-ungroup on-context-menu selected-full]}]
|
||||
(let [group-open? (get open-groups prefix true)
|
||||
(let [group-open? (if (false? (get open-groups prefix)) ;; if the user has closed it specifically, respect that
|
||||
false
|
||||
(get open-groups prefix true))
|
||||
dragging* (mf/use-state false)
|
||||
dragging? (deref dragging*)
|
||||
selected-paths (mf/with-memo [selected-full]
|
||||
|
|
Loading…
Add table
Reference in a new issue