🐛 Do not render assets sidebar context menu if it is not open (#7222)

This commit is a workaround to an issue that happens when you performing
multiple selection of several shapes (including components) and an
exception is raised of max depth of updates. The issue is still not
solved, we justo do not render the context menu when user performs
the selection on the workspace.

That issue/exception happens only we have context-menu* component
rendered independently of its visibility and dev-tools open
This commit is contained in:
Andrey Antukh 2025-08-29 13:53:55 +02:00 committed by GitHub
parent 2479a06f9a
commit fe5cdcbdc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,17 +178,18 @@
:class (stl/css-case :section-button true :class (stl/css-case :section-button true
:opened menu-open?)} :opened menu-open?)}
i/filter-icon]] i/filter-icon]]
[:> context-menu* (when menu-open?
{:on-close on-menu-close [:> context-menu*
:selectable true {:on-close on-menu-close
:selected section :selectable true
:show menu-open? :selected section
:fixed true :show true
:min-width true :fixed true
:width size :min-width true
:top 158 :width size
:left 18 :top 158
:options options}] :left 18
:options options}])
[:> icon-button* {:variant "ghost" [:> icon-button* {:variant "ghost"
:aria-label (tr "workspace.assets.sort") :aria-label (tr "workspace.assets.sort")
:on-click toggle-ordering :on-click toggle-ordering