From b87ae4e98bf6bbd6988e2c7326a947db4de7981f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 5 Feb 2019 16:14:18 -0500 Subject: [PATCH] Exclude existing keys from auto-completion in raw tag editor (closes #3625) --- modules/ui/raw_tag_editor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index 2b6dcaf66..3f2adedcf 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -227,7 +227,12 @@ export function uiRawTagEditor(context) { geometry: geometry, query: value }, function(err, data) { - if (!err) callback(sort(value, data)); + if (!err) { + var filtered = data.filter(function(d) { + return _tags[d.value] === undefined; + }); + callback(sort(value, filtered)); + } }); }));