twitter / typeahead.js

typeahead.js is a fast and fully-featured autocomplete library
http://twitter.github.io/typeahead.js/
MIT License
16.52k stars 3.21k forks source link

Documentation for custom DOM elements #1607

Open Dutchy- opened 7 years ago

Dutchy- commented 7 years ago

I've found the option to specify custom DOM elements in #902 , but this is not documented on https://github.com/twitter/typeahead.js/blob/master/doc/jquery_typeahead.md#options .

The reason I am asking is because I want to control all typeahead elements. I'm trying to remove all inline style elements for CSP. Can I specify all elements this way or only menu and hint?

samuel99 commented 7 years ago

Also looking for this. The "results" option that was mentioned in #875 does not seem to work.

ghost commented 6 years ago

in 0.11.1: Implemented by using template: { suggestion: Handlebars.compile('<div>{{value}} </div>') } Still looking forward to the documentation as we can only control the element being displayed and not the full DOM element

rpokrovskij commented 5 years ago

templates.suggestion is not the same as 'resuslts' and possibility to direct output to custom dropdown container. I'm unhappy with current "inline position:relative management" - it is legacy. there are ways to make the same better.

Dutchy- commented 2 years ago

I've opened this a long time ago and I am no longer invested - you can close this if you want.