bassjobsen/Bootstrap-3-Typeahead

1 Fix + 1 Enhancement: Category Header not shown and remove active when !selectOnBlur

leenooks opened this issue · 1 comments

Hi,

I noticed that category headers were not being shown, because this is not available in .each(). that was defined, but should be used.

Also, I've added removing the active element when moving the mouse outside of the list, if selectOnBlur = false .

Hopefully you find it useful:

> $ diff bootstrap3-typeahead.js bootstrap3-typeahead.js.orig
345c345
<                 if (that.showCategoryHeader) {
---
>                 if (this.showCategoryHeader) {
658,660d657
<             if (! this.selectOnBlur) {
<                  this.$menu.find('.active').removeClass('active');
<             }

I approve the fix (see #357)- could not test the enhancment