jakiestfu / Mention.js

Lightweight wrapper for adding @user mention functionality to Twitter Bootstraps Typeahead plugin
http://jakiestfu.github.com/Mention.js/
MIT License
747 stars 144 forks source link

Show all users if typeahead minLength is set to zero #6

Closed BilalBudhani closed 11 years ago

BilalBudhani commented 11 years ago

It should show whole list of users if typeaheadOpts: { minLength: 0 } is set. Thoughts?

jakiestfu commented 11 years ago

What if my dataset is 100+ users? It'd be rather long, no? Have you seen how twitter does it?

BilalBudhani commented 11 years ago

@jakiestfu I have seen how twitter does it... But I'm trying use this plugin as how GitHub does it. It show up the list of participants in an issue as soon as you type in '@'. Also, I'm saying that this shouldn't be a by default behaviour of the plugin.

jakiestfu commented 11 years ago

Here you go buddy! 0a4061aaab9b24c014e40acf6cddbb0f377192eb

The option you want to look at is emptyQuery, set it to true and all users will be returned in your list once you've entered your delimiter. Also, make sure you take a look at your typeaheadOpts.items limit as that will cap the max number of users shown!

BilalBudhani commented 11 years ago

Hey @jakiestfu thanks for the this option we're using this library in our app see it live here. Sorry for replying late. Appreciate your work :+1: :)