[third] Patch bootstrap-typeahead to handle objects that aren't strings.

Based on https://github.com/twitter/bootstrap/issues/6579. Doesn't
look like upstream is going to fix that or its 6 duplicates any
time soon.

(imported from commit b3e887d929cc42124aeb1f13abd7503f38f92a1f)
This commit is contained in:
Kevin Mehall
2013-06-18 13:52:45 -04:00
parent 0fde644417
commit fbed3e23a8

View File

@@ -1834,7 +1834,7 @@
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
var val = this.$menu.find('.active').data('typeahead-value')
this.$element
.val(this.updater(val))
.change()
@@ -1931,7 +1931,7 @@
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i = $(that.options.item).data('typeahead-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})