That's not the first time I've been disappointed in the style and operation of the JS packaged with bootstrap. While they solved some useful problems and packaged it nicely, they did so with very little regard for style, performance, or extensibility.
The typeahead plugins, both the bootstrap and the larger standalone versions, are hellish to work with or modify in any way. The same goes for dropdown and many others. Unfortunately they never thought that anyone would use these plugins except in their prescribed way - so few to no events are ever thrown, and incoming events are often canceled (stopPropagation, preventDefault), making it hard/impossible to reuse those events for other interactions.
I have had to monkey patch bootstrap JS more times than I can count and I generally stay away from it now. I don't think there's anybody paying much attention to the repos anymore; the number of issues and PRs outstanding for typeahead.js (a small library!) is pretty astounding.
FYI, the older versions of bootstrap.typeahead were more performant, but of course did far less than the now standalone typeahead.js does.
Don't get me wrong, typeahead.js is a nice project and the devs have clearly worked very hard on it. It does some really nice things. But there is clearly some leakage from the twitter style where comments are barebones, assignments take place in conditionals, semicolons are missing, and ~ is a common sight. It is effectively write-only code.
The typeahead plugins, both the bootstrap and the larger standalone versions, are hellish to work with or modify in any way. The same goes for dropdown and many others. Unfortunately they never thought that anyone would use these plugins except in their prescribed way - so few to no events are ever thrown, and incoming events are often canceled (stopPropagation, preventDefault), making it hard/impossible to reuse those events for other interactions.
I have had to monkey patch bootstrap JS more times than I can count and I generally stay away from it now. I don't think there's anybody paying much attention to the repos anymore; the number of issues and PRs outstanding for typeahead.js (a small library!) is pretty astounding.
FYI, the older versions of bootstrap.typeahead were more performant, but of course did far less than the now standalone typeahead.js does.
Don't get me wrong, typeahead.js is a nice project and the devs have clearly worked very hard on it. It does some really nice things. But there is clearly some leakage from the twitter style where comments are barebones, assignments take place in conditionals, semicolons are missing, and ~ is a common sight. It is effectively write-only code.