Open yiochen opened 8 years ago
The example here uses throttle
throttle
var input = document.getElementById('input'); var dictionarySuggest = Rx.Observable.fromEvent(input, 'keyup') .map(() => input.value) .filter(text => !!text) .distinctUntilChanged() .throttle(250) .flatMapLatest(searchWikipedia) .subscribe( results => { list = []; list.concat(results.map(createItem)); }, err => logError(err) );
In my understanding, throttle will potentially ignore the last keyup event. Is this what we wanted?
The example here uses
throttle
In my understanding, throttle will potentially ignore the last keyup event. Is this what we wanted?