From 9d8116ff6dc418004a00bfbd54f283c551df5fda Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 8 Nov 2022 19:24:31 +0100 Subject: [PATCH] don't indent combo content when there is no icon for tag value --- modules/ui/fields/combo.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 245b14825..a6029ad13 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -494,13 +494,12 @@ export function uiFieldCombo(field, context) { value = tagValue(value); if (valueIcons[field.key]) { _container.selectAll('.tag-value-icon').remove(); - var iconSelector = _container.selectAll('.tag-value-icon') - .data([value]) - .enter() - .insert('div', 'input') - .attr('class', 'tag-value-icon'); if (valueIcons[field.key].indexOf(value) !== -1) { - iconSelector + _container.selectAll('.tag-value-icon') + .data([value]) + .enter() + .insert('div', 'input') + .attr('class', 'tag-value-icon') .call(svgIcon('#iD-' + field.key.replace(/:/g, '_') + '-' + value.replace(/:/g, '_'))); } }