mirror of
https://github.com/penpot/penpot.git
synced 2025-07-24 05:27:13 +02:00
✨ Add a default 256 maxlength value to all input fields
This commit is contained in:
parent
c1853a71a9
commit
b1df0ac194
7 changed files with 22 additions and 3 deletions
|
@ -10,6 +10,7 @@
|
|||
[app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.constants :refer [max-input-length]]
|
||||
[app.main.ui.ds.controls.shared.options-dropdown :refer [options-dropdown*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon* icon-list] :as i]
|
||||
[app.util.array :as array]
|
||||
|
@ -60,6 +61,7 @@
|
|||
[:id {:optional true} :string]
|
||||
[:options [:vector schema:combobox-option]]
|
||||
[:class {:optional true} :string]
|
||||
[:max-length {:optional true} :int]
|
||||
[:placeholder {:optional true} :string]
|
||||
[:disabled {:optional true} :boolean]
|
||||
[:default-selected {:optional true} :string]
|
||||
|
@ -69,7 +71,7 @@
|
|||
(mf/defc combobox*
|
||||
{::mf/props :obj
|
||||
::mf/schema schema:combobox}
|
||||
[{:keys [id options class placeholder disabled has-error default-selected on-change] :rest props}]
|
||||
[{:keys [id options class placeholder disabled has-error default-selected on-change max-length] :rest props}]
|
||||
(let [open* (mf/use-state false)
|
||||
open (deref open*)
|
||||
|
||||
|
@ -240,6 +242,7 @@
|
|||
:aria-activedescendant focused
|
||||
:class (stl/css :input)
|
||||
:data-testid "combobox-input"
|
||||
:maxlength (d/nilv max-length max-input-length)
|
||||
:disabled disabled
|
||||
:value selected
|
||||
:on-change on-input-change
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue