diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index b34f6a0f4..91d20daca 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -779,11 +779,11 @@ $.fn.dropdown = function(parameters) { results.push(this); return true; } - else if (settings.fullTextSearch === "exact" && module.exactSearch(searchTerm, text)) { + else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) { results.push(this); return true; } - else if (!settings.fullTextSearch === "exact" && settings.fullTextSearch && module.fuzzySearch(searchTerm, text)) { + else if (settings.fullTextSearch !== 'exact' && settings.fullTextSearch && module.fuzzySearch(searchTerm, text)) { results.push(this); return true; } @@ -842,8 +842,7 @@ $.fn.dropdown = function(parameters) { exactSearch: function (query, term) { query = query.toLowerCase(); term = term.toLowerCase(); - - if (term.indexOf(query) > -1) { + if(term.indexOf(query) > -1) { return true; } return false; @@ -3484,7 +3483,7 @@ $.fn.dropdown.settings = { keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing match : 'both', // what to match against with search selection (both, text, or label) - fullTextSearch : false, // search anywhere in value + fullTextSearch : false, // search anywhere in value (set to 'exact' to require exact matches) placeholder : 'auto', // whether to convert blank