mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 18:31:37 +02:00
🐛 Fix open path when showing a component in assets
This commit is contained in:
parent
e4cadc36b0
commit
07bc5d911b
1 changed files with 13 additions and 9 deletions
|
@ -1354,11 +1354,15 @@
|
||||||
file-id (get-in state [:workspace-file :id])
|
file-id (get-in state [:workspace-file :id])
|
||||||
page-id (get state :current-page-id)
|
page-id (get state :current-page-id)
|
||||||
pparams {:file-id file-id :project-id project-id}
|
pparams {:file-id file-id :project-id project-id}
|
||||||
qparams {:page-id page-id :layout :assets}]
|
qparams {:page-id page-id :layout :assets}
|
||||||
|
component-path (cph/split-path (get-in state [:workspace-data :components component-id :path]))
|
||||||
|
paths (map (fn [i] (cph/join-path (take (inc i) component-path))) (range (count component-path)))]
|
||||||
|
(rx/concat
|
||||||
|
(rx/from (map #(set-assets-group-open file-id :components % true) paths))
|
||||||
(rx/of (rt/nav :workspace pparams qparams)
|
(rx/of (rt/nav :workspace pparams qparams)
|
||||||
(set-assets-section-open file-id :library true)
|
(set-assets-section-open file-id :library true)
|
||||||
(set-assets-section-open file-id :components true)
|
(set-assets-section-open file-id :components true)
|
||||||
(select-single-asset file-id component-id :components))))
|
(select-single-asset file-id component-id :components)))))
|
||||||
|
|
||||||
ptk/EffectEvent
|
ptk/EffectEvent
|
||||||
(effect [_ _ _]
|
(effect [_ _ _]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue