Manage empty property values in the combobox in design tab (#6574)

*  Manage empty property values in the combobox in design tab

* 📎 PR changes
This commit is contained in:
luisδμ 2025-05-28 12:41:04 +02:00 committed by GitHub
parent 878952f7b5
commit 46b0e4f0e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 168 additions and 101 deletions

View file

@ -59,11 +59,12 @@
[:disabled {:optional true} :boolean]
[:default-selected {:optional true} :string]
[:on-change {:optional true} fn?]
[:empty-to-end {:optional true} :boolean]
[:has-error {:optional true} :boolean]])
(mf/defc combobox*
{::mf/schema schema:combobox}
[{:keys [id options class placeholder disabled has-error default-selected max-length on-change] :rest props}]
[{:keys [id options class placeholder disabled has-error default-selected max-length empty-to-end on-change] :rest props}]
(let [is-open* (mf/use-state false)
is-open (deref is-open*)
@ -187,7 +188,6 @@
(kbd/enter? event)
(do
#_(handle-selection focused-value* selected-value* is-open*)
(reset! selected-value* focused-value)
(reset! is-open* false)
(reset! focused-value* nil)
@ -286,4 +286,5 @@
:focused focused-value
:set-ref set-option-ref
:id listbox-id
:empty-to-end empty-to-end
:data-testid "combobox-options"}])]))