poteto / ember-hypersearch

Hyperspeed real-time search with caching
MIT License
55 stars 24 forks source link

Expose 'immediate' parameter for debounce #22

Closed sirvine closed 7 years ago

sirvine commented 8 years ago

In some cases, users will expect a search query to run after they've stopped typing. In order to enable this behavior as an option, a debounceAfter property is added that defaults to true, but can be set to false.

Per the Ember.run docs (http://emberjs.com/api/classes/Ember.run.html#method_debounce), the last parameter of debounce() causes the method to be run immediately, with subsequent calls to the same method blocked until the specified time period expires.

The property name debounceAfter is admittedly not great, but I'm not sure what's better.

Artistan commented 8 years ago

implemented in fork/rename to hypersearcher... https://www.npmjs.com/package/ember-hypersearcher

mattmcmanus commented 7 years ago

@poteto This problem just bit me and it took some time to figure out. Just curious, why was this closed? Should we be using hypersearcher?

Artistan commented 7 years ago

@mattmcmanus - That is why i forked it. Some people complained, but I found it more useful to actually fix the problem in a fork rather than wait. It was closed due to time elapsed and that it then had conflicts.