Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Typeahead no option to have all items display. #2324

Closed
HerrPfister opened this issue Jun 10, 2014 · 12 comments
Closed

Typeahead no option to have all items display. #2324

HerrPfister opened this issue Jun 10, 2014 · 12 comments

Comments

@HerrPfister
Copy link

There is no clear way to display all items, stored in the typeahead, when there is no text in the input and the typeahead gains focus. Did I overlook something? Is there a way to do this? If so, how?

@pkozlowski-opensource
Copy link
Member

@HerrPfister I'm not sure I understand the issue based on the provided problem description.... Will be very hard to assist you without a minimal reproduce scenario using plunker.

@HerrPfister
Copy link
Author

Sorry. http://plnkr.co/edit/M3zrBiNcP9MjBKNKE8KP?p=preview

So in the above, I set the typeahead-min-length="0"

I do this because I want the popup to appear with all options, contained in the typeahead, when there is nothing typed in the input and the typeahead gains focus.

So if the list contains [dog, cat, and monkey] I want all three to appear when the typehead gains focus and their is nothing typed in to the input.

@marcusg
Copy link

marcusg commented Feb 25, 2015

any updates here? I think this would be a nice feature ;)

@sharpmachine
Copy link

I want the same thing! Any updates?

@dmitrijs
Copy link

dmitrijs commented Jul 5, 2015

+1

1 similar comment
@brunocoelho
Copy link

+1

@brunocoelho
Copy link

I know that you have to support async load, but it would be a nice and very useful feature if you have a list pre-loaded.

@bestconsultant
Copy link

Thanks for adding this

@bestconsultant
Copy link

Would actually be even nicer with a scroll when displaying all elements but with a limit of (e.g.) 8 results only so that the user does not believe that the list is displaying all results.

@icfantv
Copy link
Contributor

icfantv commented Mar 26, 2016

@flaurian, that is beyond the scope of this library, but you can do it yourself quite easily with CSS.

@bestconsultant
Copy link

thanks for your comment @icfantv !

Just wondering what you mean by scope... I thought the purpose of such a library is to 1) do things bootstrap isn't doing well (I suppose they also have defined a "scope"), 2) build best-practice versions of basic web functionalities.

IMHO it seems rather obvious that when you are using a typeahead you should be able to a) show all elements (after all it's an enhanced dropdown), b) manage the use case smoothly if the list of elements is way too long (in my case I am selecting an employee out of ~100).
But indeed as you said I managed it easily like this :

.dropdown-menu{ max-height:200px; overflow-y:auto; }

Cheers

@icfantv
Copy link
Contributor

icfantv commented Mar 26, 2016

While we do make certain UX decisions and indeed some CSS ones as well, determining on whether someone wants a scrollbar to appear it not our call. To be clear, I have CSS in our app so in certain areas the scrollbar always shows on WebKit browsers, but again, this specific use case is not one we should be making. As soon as we do, someone is going to file a bug asking for a way to turn it off.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants