mirror of https://github.com/trezor/trezor-wallet
Merge pull request #508 from trezor/feature/debounced-send-form
Feature/debounce validation in send formspull/516/head
commit
0523c9a801
@ -0,0 +1,9 @@
|
||||
export const debounce = (func, wait) => {
|
||||
let timeout;
|
||||
return (...args) => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
func(...args);
|
||||
}, wait);
|
||||
};
|
||||
};
|
Loading…
Reference in new issue