thecodeassassin/bootstrap-remote-data

The remote tab plugin is not working with Typeahead

Opened this issue · 2 comments

I have bootstrap typeahead and its not working with this plugin. If i goto the tab, nothing happens. No request is initiated it.

When i remove typeahead it works, but i also found the following line of code in the plugin, which made me think why this plugin is looking for Typeahead.

bootstrapVersion2 = (jQuery().typeahead ? true : false),

and below the above line of code, it has this:

tabShowEvent = (bootstrapVersion2 ? 'show' : 'show.bs.tab'),

But i'm unsure why its changing the values if I have Typeahead, weird?

m1dst commented

I have typeahead loaded in my project and I didn't have a problem with it not working.

The code you pointed out is just using the existance of "typeahead" to figure out which version of bootstrap you have loaded.. its saying "if typeahead exists, we must be using bootstrap v3, otherwise its bootstrap v2) ... the tabevent line use the version of bootstrap detected to decide which event name to use. I guess the event name changed in v3