From 8f275206af77b4c34f58f2aca9354d36d9cfcd6a Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 29 Sep 2016 22:54:51 +0200 Subject: [PATCH] client/search: correct case in autocompleted tags --- client/js/controls/tag_auto_complete_control.js | 7 ++----- 1 file 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 { ${origName} (${usages}) `, - value: kv[0], + value: origName, }; }); };