0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

🐛 Fix problem with fast change between numeric inputs

This commit is contained in:
alonso.torres 2024-03-14 12:42:07 +01:00
parent 75d0648065
commit d5b2a91bce

View file

@ -169,6 +169,13 @@
(update-input value-str)
(dom/blur! node)))))
handle-change
(mf/use-fn
(mf/deps parse-value)
(fn []
;; Store the last value inputed
(reset! last-value* (parse-value))))
handle-mouse-wheel
(mf/use-fn
(mf/deps set-delta)
@ -218,7 +225,7 @@
(obj/unset! "selectOnFocus")
(obj/unset! "nillable")
(obj/set! "value" mf/undefined)
(obj/set! "onChange" mf/undefined)
(obj/set! "onChange" handle-change)
(obj/set! "className" class)
(obj/set! "type" "text")
(obj/set! "ref" ref)