aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorrr-2016-09-29 22:54:51 +0200
committerrr-2016-09-29 22:54:51 +0200
commit8f275206af77b4c34f58f2aca9354d36d9cfcd6a (patch)
treeae267940d103aa7569da123d5cae5676b1950135 /client
parent977cc47966f4b9dfddf62e53d9c614593fd29f7f (diff)
client/search: correct case in autocompleted tags
Diffstat (limited to 'client')
-rw-r--r--client/js/controls/tag_auto_complete_control.js7
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,
};
});
};

© 2015 - 2026 Jakob L. Kreuze