diff --git a/src/util/util.js b/src/util/util.js index 37af456b76513385946370f53e59b4ce6658058f..111a2a88a55b6277b33ef0fb264717b434cc6da8 100644 --- a/src/util/util.js +++ b/src/util/util.js @@ -481,10 +481,6 @@ morpheus.Util.autosuggest = function (options) { return false; } - if (ui.item.select) { - ui.item.select(options.$el); - return false; - } if (options.multi) { var terms = morpheus.Util .getAutocompleteTokens( @@ -494,7 +490,8 @@ morpheus.Util.autosuggest = function (options) { selectionStart: options.$el[0].selectionStart }); - var value = ui.item.value; + var field = event.toElement.dataset.autocomplete; + var value = field ? ui.item[field] : ui.item.value; var show = ui.item.show; // replace the current input @@ -535,8 +532,10 @@ morpheus.Util.autosuggest = function (options) { // use html for label instead of default text var instance = options.$el.autocomplete('instance'); instance._renderItem = function (ul, item) { - return $('