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:
parent
75d0648065
commit
d5b2a91bce
1 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue