Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@omarstreak
Created December 18, 2017 18:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omarstreak/fbedd5a70837e3e8751008b49b466cb7 to your computer and use it in GitHub Desktop.
Save omarstreak/fbedd5a70837e3e8751008b49b466cb7 to your computer and use it in GitHub Desktop.
Kefir cursor handling
Kefir.merge([
Kefir.fromEvents(input, 'keyup'),
Kefir.fromEvents(input, 'input'),
Kefir.fromEvents(input, 'click'),
Kefir.fromEvents(input, 'focus')
])
.takeUntilBy(elementDestroyedObservable)
.debounce(100)
.onValue(() => /* do some stuff */)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment