From 2f1e87a1bc89926e2948afc195ef223b86ba3c16 Mon Sep 17 00:00:00 2001 From: Konstantin Vorobyev Date: Thu, 23 Feb 2017 22:18:46 +0900 Subject: Reintroduce word search in board selector #3052 --- assets/js/components/select-dropdown-autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets/js/components') diff --git a/assets/js/components/select-dropdown-autocomplete.js b/assets/js/components/select-dropdown-autocomplete.js index c2c36f5b..188dd5e9 100644 --- a/assets/js/components/select-dropdown-autocomplete.js +++ b/assets/js/components/select-dropdown-autocomplete.js @@ -161,7 +161,7 @@ KB.component('select-dropdown-autocomplete', function(containerElement, options) var hasActiveItem = false; for (var i = 0; i < items.length; i++) { - if (text.length === 0 || items[i]['data-label'].toLowerCase().indexOf(text.toLowerCase()) === 0) { + if (text.length === 0 || items[i]['data-label'].toLowerCase().indexOf(text.toLowerCase()) > -1) { var item = items[i]; if (typeof options.defaultValue !== 'undefined' && String(options.defaultValue) === item['data-value']) { -- cgit v1.2.3