devbridge / jQuery-Autocomplete

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields
https://www.devbridge.com/sourcery/components/jquery-autocomplete/
Other
3.56k stars 1.66k forks source link

Highlight, when presents, more than one words #682

Closed luX0r-reload closed 6 years ago

luX0r-reload commented 6 years ago

Hi, Thanks for your useful works, I'm using autocomplete for a project and it works very well. Suggests box in my project works like the eBay one, and my db query retrieve suggestions through one or more keywords. E.g. writing "nvidia 4000" my query retrieve "nvidia quadro 4000" results too. In this case your autocomplete highlight (make bold) only the nvidia word. It's possible highlight the other keywords too?

Thanks in advance.

L.

tkirda commented 6 years ago

You need to implement custom formatResult. Sample how to match multiple words can be found here: https://github.com/devbridge/jQuery-Autocomplete/issues/592