fix: stop event when pressing enter or space on a property value

pull/11311/head
Tienson Qin 2024-05-09 17:53:15 +08:00
parent 45e5cde3f9
commit e7562e0853
1 changed files with 4 additions and 0 deletions

View File

@ -614,6 +614,10 @@
:div.jtrigger.flex.flex-1.w-full :div.jtrigger.flex.flex-1.w-full
{:ref *el {:ref *el
:tabIndex 0 :tabIndex 0
:on-key-down (fn [^js e]
(when (contains? #{"Enter" " "} (.-key e))
(.click (.-target e))
(util/stop e)))
:on-click #(show! (.-target %))} :on-click #(show! (.-target %))}
(if (string/blank? value) (if (string/blank? value)
(property-empty-value) (property-empty-value)