Hi there,

I've just put the typehead plugin to use in an app but had to modify
it slightly to allow the dropdown to appear when no search query has
been entered. So, I added the options "minQueryLength" and
"disableQuery" to allow this to happen:

     if (this.query.length < this.minQueryLength)
     {
        return this.shown ? this.hide() : this
     }

     if (this.query.length > 0 || !this.disableQuery)
     {
        items = $.grep(this.source, function (item)
        {
           return that.matcher(item)
        })
     }
     else
     {
        items = this.source.slice(0);
     }

This may not be the best way to handle this, but here it is anyway,
fwiw.

Cheers, Andrew.

Reply via email to