v1-safe-app icon indicating copy to clipboard operation
v1-safe-app copied to clipboard

Debounce input validation

Open PaulRBerg opened this issue 5 years ago • 4 comments

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.

PaulRBerg avatar Jun 04 '20 12:06 PaulRBerg

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.

TomAFrench avatar Jun 04 '20 13:06 TomAFrench

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!

PaulRBerg avatar Jun 04 '20 18:06 PaulRBerg

Are you still experiencing this issue?

TomAFrench avatar Jun 09 '20 19:06 TomAFrench

Yup.

PaulRBerg avatar Jun 11 '20 16:06 PaulRBerg