Customize typeahead tokenizer
This commit is contained in:
parent
c6a19afd29
commit
f207137b35
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,15 @@
|
|||
comparator: function(m) {
|
||||
return m.get('name');
|
||||
},
|
||||
|
||||
_tokenize: function(s) {
|
||||
s = $.trim(s);
|
||||
if (s.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return s.toLowerCase().split(/[\s\-_+]+/)
|
||||
}
|
||||
});
|
||||
|
||||
Whisper.InboxView = Backbone.View.extend({
|
||||
|
|
Loading…
Reference in a new issue