0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

Emit numeric input changes only if value actually changed

This commit is contained in:
Andrés Moya 2021-06-21 14:38:28 +02:00
parent ac1d0a5502
commit 4e909dc369
2 changed files with 5 additions and 4 deletions

View file

@ -14,6 +14,7 @@
### :bug: Bugs fixed
- Process numeric input changes only if the value actually changed.
- Remove unnecesary redirect from history when user goes to workspace from dashboard [Taiga #1820](https://tree.taiga.io/project/penpot/issue/1820).
- Fix tooltip position on view application [Taiga #1819](https://tree.taiga.io/project/penpot/issue/1819).
- Fix dashboard navigation on moving file to other team [Taiga #1817](https://tree.taiga.io/project/penpot/issue/1817).

View file

@ -70,11 +70,11 @@
apply-value
(mf/use-callback
(mf/deps on-change update-input)
(mf/deps on-change update-input value)
(fn [new-value]
(when new-value
(when on-change
(on-change new-value))
(when (and (some? new-value) (not= new-value value) (some? on-change))
(on-change new-value))
(when (some? new-value)
(update-input new-value))))
set-delta