Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. handleChange(e) {
  2. e.persist();
  3. // info: "this.debounced" is defined at the class level
  4. if (!this.debounced) {
  5. this.debounced = _.debounce(() => {
  6. console.log('YATTA!');
  7. this.debounced.cancel();
  8. this.debounced = undefined;
  9. }, 500);
  10. this.debounced();
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement