diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index f6e769af7..9220b81a2 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -422,7 +422,9 @@ export function uiSectionRawTagEditor(id, context) { query: value }, function(err, data) { if (!err) { - var filtered = data.filter(function(d) { return _tags[d.value] === undefined; }); + const filtered = data + .filter(d => _tags[d.value] === undefined) + .filter(d => d.value.toLowerCase().includes(value.toLowerCase())); callback(sort(value, filtered)); } }); @@ -436,7 +438,10 @@ export function uiSectionRawTagEditor(id, context) { geometry: geometry, query: value }, function(err, data) { - if (!err) callback(sort(value, data)); + if (!err) { + const filtered = data.filter(d => d.value.toLowerCase().includes(value.toLowerCase())); + callback(sort(value, filtered)); + } }); }) .caseSensitive(allowUpperCaseTagValues.test(utilGetSetValue(key))));