matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
436 stars 68 forks source link

Start Searching After 3 Characters? #568

Closed krishaamer closed 7 years ago

krishaamer commented 7 years ago

Hey @matteodem, the plugin is working great, thanks so much for your work!

I was wondering is it possible to limit the search in a way that it only starts after 3 characters have been written? I can feel the search slow down with 1-2 characters because it's pulling in most of the results containing just the single letter.

You can try it out here: http://100.haam.co

Best, Kris

matteodem commented 7 years ago

You can extend the input component and override the keyup input logic, see https://github.com/matteodem/meteor-easy-search/blob/master/packages/easysearch:components/lib/input/input.js#L37. Or create a PR that allows to configure this logic (might make the event parameter obsolete).