Removed extra padding in comboboxes when the caret is hidden

This commit is contained in:
Quincy Morgan
2019-01-18 11:59:40 -05:00
parent af011d990c
commit 46beb31e74
2 changed files with 11 additions and 8 deletions

View File

@@ -1420,6 +1420,15 @@ img.tag-reference-wiki-image {
.form-field-input-combo > input:only-of-type {
border-radius: 0 0 4px 4px;
}
.form-field-input-combo.empty-combobox input,
.form-field-input-multicombo .empty-combobox input {
padding-right: 10px;
padding-left: 10px;
}
.form-field-input-combo.empty-combobox .combobox-caret,
.form-field-input-multicombo .empty-combobox .combobox-caret {
display: none;
}
.form-field-input-multicombo ul.chiplist {
padding: 5px 7px 5px 7px;

View File

@@ -191,14 +191,8 @@ export function uiFieldCombo(field, context) {
});
}
if (data.length === 0) {
// hide the caret if there are no suggestions
container.select('.combobox-caret')
.style('display', 'none');
} else {
container.select('.combobox-caret')
.style('display', null);
}
// hide the caret if there are no suggestions
container.classed('empty-combobox', data.length === 0);
_comboData = _map(data, function(d) {
var k = d.value;