0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

Merge pull request #5113 from penpot/superalex-fix-show-in-assets-panel

🐛 Fix show in assets panel
This commit is contained in:
Eva Marco 2024-09-24 09:38:32 +02:00 committed by GitHub
commit 17cf57f7ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -116,9 +116,9 @@
(mf/defc tab-switcher*
{::mf/props :obj
::mf/schema schema:tab-switcher}
[{:keys [class tabs on-change-tab default-selected action-button-position action-button] :rest props}]
(let [selected* (mf/use-state #(get-selected-tab-id tabs default-selected))
selected (deref selected*)
[{:keys [class tabs on-change-tab default-selected selected action-button-position action-button] :rest props}]
(let [selected* (mf/use-state #(or selected (get-selected-tab-id tabs default-selected)))
selected (or selected (deref selected*))
tabs-nodes-refs (mf/use-ref nil)
tabs-ref (mf/use-ref nil)

View file

@ -136,7 +136,8 @@
:else
[:div {:class (stl/css :settings-bar-content)}
[:> tab-switcher* {:tabs tabs
:default-selected (dm/str section)
:default-selected "layers"
:selected (name section)
:on-change-tab on-tab-change
:class (stl/css :left-sidebar-tabs)
:action-button-position "start"