don't indent combo content when there is no icon for tag value

This commit is contained in:
Martin Raifer
2022-11-08 19:24:31 +01:00
parent 8b2ca39521
commit 9d8116ff6d
+5 -6
View File
@@ -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, '_')));
}
}