mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
[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:
@@ -1834,7 +1834,7 @@
|
|||||||
constructor: Typeahead
|
constructor: Typeahead
|
||||||
|
|
||||||
, select: function () {
|
, select: function () {
|
||||||
var val = this.$menu.find('.active').attr('data-value')
|
var val = this.$menu.find('.active').data('typeahead-value')
|
||||||
this.$element
|
this.$element
|
||||||
.val(this.updater(val))
|
.val(this.updater(val))
|
||||||
.change()
|
.change()
|
||||||
@@ -1931,7 +1931,7 @@
|
|||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
items = $(items).map(function (i, item) {
|
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))
|
i.find('a').html(that.highlighter(item))
|
||||||
return i[0]
|
return i[0]
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user