From a5028e559900c05540541ec563efd9aac6cd1276 Mon Sep 17 00:00:00 2001 From: Rupert Date: Fri, 14 Oct 2016 13:43:20 -0700 Subject: [PATCH] Fix #3424 Dropdown fullTextSearch=exact was only implemented for the text search, not the value search. The value term was using a fuzzy match even with fullTextSearch=exact. --- src/definitions/modules/dropdown.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 0ae40b02b..1df5507bb 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -789,12 +789,15 @@ $.fn.dropdown = function(parameters) { } if(settings.match == 'both' || settings.match == 'value') { value = String(module.get.choiceValue($choice, text)); - if(value.search(beginsWithRegExp) !== -1) { results.push(this); return true; } - else if(settings.fullTextSearch && module.fuzzySearch(searchTerm, value)) { + else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, value)) { + results.push(this); + return true; + } + else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, value)) { results.push(this); return true; }