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:
commit
17cf57f7ca
2 changed files with 5 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue