Browse Source

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.
pull/4651/head
Rupert 8 years ago
committed by GitHub
parent
commit
a5028e5599
1 changed files with 5 additions and 2 deletions
  1. 7
      src/definitions/modules/dropdown.js

7
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;
}

Loading…
Cancel
Save