mirror of
https://github.com/penpot/penpot.git
synced 2025-07-24 05:27:13 +02:00
✨ 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:
parent
878952f7b5
commit
46b0e4f0e7
9 changed files with 168 additions and 101 deletions
|
@ -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"}])]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue