typeahead.js icon indicating copy to clipboard operation
typeahead.js copied to clipboard

show all possible options on focus

Open netcult opened this issue 12 years ago • 18 comments

I'm using typeahead.js in combination with bootstrap.

Works great! But I would like to show all possible options straight away on focus of the input field. Goal is to create a kind of select element (with 6 standard options in my case) which allows users to add a custom option if they want. But I need the user to immediately see the already available options.

Can this be done? Thanks a million!

M.

netcult avatar Dec 11 '13 13:12 netcult

+1

mkeuschn avatar Dec 26 '13 10:12 mkeuschn

That sort of functionality isn't in the wheelhouse of typeahead.js. It's mostly meant for supplementing search boxes.

I'd suggest Select2.

jharding avatar Dec 27 '13 06:12 jharding

@jharding

I don't think you fully understand.. With select2 the user is not able to type something if he can't find the option he is looking for.. he would be obliged to select something from the list..

netcult avatar Dec 27 '13 15:12 netcult

I'll reopen this issue. I'm hesitant to commit to anything though as I'm unsure how I feel about adding this sort of functionality to typeahead.js.

jharding avatar Dec 28 '13 05:12 jharding

Thanks @jharding. In my opinion this is more someting for typeahead than for select2 as usually in a select you can only select what is available. Typeahead is rather a way to suggest something to the user which has already used before for example, but keeps the option to add something new. In my case I have a limited amount of categories available which the user mostmy will choose from, but occasionally he will need to create a new one. I want to show all current caategories per default so the user is more likely going to select an existing one. Thanks for considering this option on an already excelent "plugin"!

netcult avatar Dec 28 '13 14:12 netcult

:+1:

Svakinn avatar Dec 28 '13 15:12 Svakinn

+1

andrezimpel avatar Jan 12 '14 08:01 andrezimpel

+1

imolorhe avatar Feb 13 '14 14:02 imolorhe

+1

snjoetw avatar Feb 14 '14 00:02 snjoetw

+1 - please...

boblennes avatar Mar 08 '14 04:03 boblennes

+1ers, can you take a look at #719 and let me know if it will resolve this issue?

jharding avatar Mar 08 '14 05:03 jharding

I can't seem to get the commit in #719 to run, I keep getting error has no method 'onSync' .. but it looks close, however I'd like to include remote source too.

boblennes avatar Mar 12 '14 03:03 boblennes

:+1:

njj avatar Apr 09 '14 17:04 njj

+1

wchen02 avatar Apr 29 '14 15:04 wchen02

I had issues with the placeholder / hints showing both at the same time and also the hint showing as 'undefined'. I have commented on #719 with what I did to fix it for me.

DominicWatson avatar Apr 30 '14 07:04 DominicWatson

+1

moxplod avatar May 28 '14 18:05 moxplod

+1

antonpinchuk avatar Jul 17 '14 19:07 antonpinchuk

Closing in favor of #719.

jharding avatar Aug 18 '14 06:08 jharding