sablier-labs / v1-safe-app

Safe App for interacting with the Sablier protocol
https://sablier-v1-safe-app.vercel.app
GNU General Public License v3.0
19 stars 7 forks source link

Debounce input validation #22

Open PaulRBerg opened 4 years ago

PaulRBerg commented 4 years ago

I've seen we're importing a couple UI components from gnosis.pm/safe-react-components, so I'm not sure whether the fault is theirs or ours, but there's some terrible lag when holding down a number while in focus on the amount input:

See screen recording here ↗

The solution is to either use useDebounce or onBlur instead of useChange.

TomAFrench commented 4 years ago

Hmm, I can't reproduce this unfortunately. Does this always happen for you if you hold down the key?

In any case, I'll look into adding the useDebounce hook as the onBlur method would cause issues when updating whether the button to create a stream is disabled.

PaulRBerg commented 4 years ago

Does this always happen for you if you hold down the key?

Always. Maybe your computer is faster, or your browser has less bloating plugins. I do have quite a few.

In any case, I'll look into adding the useDebounce hook as the onBlur method would cause issues when updating whether the button to create a stream is disabled.

Thanks!

TomAFrench commented 4 years ago

Are you still experiencing this issue?

PaulRBerg commented 4 years ago

Yup.