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