🐛 Fix token option schema (#7186)

* 🐛 Fix token option schema

* 🐛 Fix numeric-input schema
This commit is contained in:
Eva Marco 2025-08-26 14:06:59 +02:00 committed by GitHub
parent c5958e4d61
commit 31e37f352d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -149,14 +149,14 @@
(def ^:private schema:icon
[:and :string [:fn #(contains? icon-list %)]])
;; TODO: Review schema props
(def ^:private schema:numeric-input
[:map
[:id {:optional true} :string]
[:class {:optional true} :string]
;; [:value {:optional true} [:maybe [:or
;; :int
;; :string]]]
[:value {:optional true} [:maybe [:or
:int
:string
[:= :multiple]]]]
[:default {:optional true} [:maybe :string]]
[:placeholder {:optional true} :string]
[:icon {:optional true} [:maybe schema:icon]]
@ -301,7 +301,6 @@
(when (fn? on-change)
(on-change parsed))
;; Comprar si es valor es necesario, sino borrar
(mf/set-ref-val! raw-value* (fmt/format-number parsed))
(update-input (fmt/format-number parsed)))

View File

@ -18,11 +18,10 @@
[:map
[:id {:optiona true} :string]
[:ref some?]
[:resolved {:optional true} [:or :number :string]]
[:resolved {:optional true} [:or :int :string]]
[:name {:optional true} :string]
[:on-click {:optional true} fn?]
[:selected {:optional true} :boolean]
[:focused {:optional true} :boolean]
[:focused {:optional true} :boolean]])
(mf/defc token-option*