0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-23 23:35:58 -05:00

🐛 Do not forward invalid prop to dom node on form input component

This commit is contained in:
Andrey Antukh 2024-01-11 15:22:42 +01:00
parent 189d0c107c
commit 6c2f9b7bd3

View file

@ -86,10 +86,8 @@
(when-not (get-in @form [:touched input-name])
(swap! form assoc-in [:touched input-name] true)))
props (-> props
(dissoc :help-icon :form :trim :children)
(dissoc :help-icon :form :trim :children :show-success?)
(assoc :id (name input-name)
:value value
:auto-focus auto-focus?
@ -152,8 +150,6 @@
[:> :input props]
children])
(cond
(and touched? (:message error))
[:div {:id (dm/str "error-" input-name)