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

View File

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