Added regex quoting of query.

This commit is contained in:
Martin Edenhofer 2016-05-17 23:26:48 +02:00
parent 182f97ce7d
commit dff4a03208

View file

@ -163,6 +163,7 @@ class App.SearchableSelect extends Spine.Controller
@filterByQuery @query
filterByQuery: (query) ->
query = escapeRegExp(query)
regex = new RegExp(query.split(' ').join('.*'), 'i')
@option_items