enhance: clear selection before closing popup

This commit is contained in:
Tienson Qin
2024-05-17 11:13:56 +08:00
parent bf72ff47e0
commit db721ee3f6
2 changed files with 13 additions and 7 deletions

View File

@@ -838,8 +838,8 @@
(shui/popup-show! e
(fn [{:keys [id]}]
[:div {:on-click #(shui/popup-hide! id)} content])
{:content-props {:class "w-[280px] ls-context-menu-content"}
:root-props {:onOpenChange #(when-not % (state/clear-selection!))}
{:on-hide state/clear-selection!
:content-props {:class "w-[280px] ls-context-menu-content"}
:as-dropdown? true}))
handled