Permalink
Browse files

Update typeahead.js

Highlighter should original JSON item and highlight displayField value.
  • Loading branch information...
ssharunas committed Sep 5, 2012
1 parent ba11dba commit 836252d71bb91feed36262a05cc81c19769e13e4
Showing with 2 additions and 2 deletions.
  1. +2 −2 typeahead.js
View
@@ -284,7 +284,7 @@
text = item;
}
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+ return text.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>';
})
},
@@ -312,7 +312,7 @@
.attr('data-text' , text);
- el.find('a').html(that.highlighter(text));
+ el.find('a').html(that.highlighter(item));
return el[0];
})

0 comments on commit 836252d

Please sign in to comment.