diff options
| author | rr- | 2016-09-29 22:54:51 +0200 |
|---|---|---|
| committer | rr- | 2016-09-29 22:54:51 +0200 |
| commit | 8f275206af77b4c34f58f2aca9354d36d9cfcd6a (patch) | |
| tree | ae267940d103aa7569da123d5cae5676b1950135 /client | |
| parent | 977cc47966f4b9dfddf62e53d9c614593fd29f7f (diff) | |
client/search: correct case in autocompleted tags
Diffstat (limited to 'client')
| -rw-r--r-- | client/js/controls/tag_auto_complete_control.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/client/js/controls/tag_auto_complete_control.js b/client/js/controls/tag_auto_complete_control.js index 2fffcf9..e536da1 100644 --- a/client/js/controls/tag_auto_complete_control.js +++ b/client/js/controls/tag_auto_complete_control.js @@ -6,7 +6,6 @@ const AutoCompleteControl = require('./auto_complete_control.js'); class TagAutoCompleteControl extends AutoCompleteControl { constructor(input, options) { - const caseSensitive = false; const minLengthForPartialSearch = 3; options = Object.assign({ @@ -14,9 +13,7 @@ class TagAutoCompleteControl extends AutoCompleteControl { }, options); options.getMatches = text => { - const transform = caseSensitive ? - x => x : - x => x.toLowerCase(); + const transform = x => x.toLowerCase(); const match = text.length < minLengthForPartialSearch ? (a, b) => a.startsWith(b) : (a, b) => a.includes(b); @@ -40,7 +37,7 @@ class TagAutoCompleteControl extends AutoCompleteControl { <span class="${cssName}"> ${origName} (${usages}) </span>`, - value: kv[0], + value: origName, }; }); }; |