diff --git a/scss/externs/_awesomplete.base.scss b/scss/externs/_awesomplete.base.scss index a4c21481e..f4c21e5f3 100644 --- a/scss/externs/_awesomplete.base.scss +++ b/scss/externs/_awesomplete.base.scss @@ -20,7 +20,7 @@ flex-direction: row; flex-grow: 1; position: fixed; - min-width: 180px; + min-width: 100%; } .awesomplete > input { @@ -47,7 +47,7 @@ left: 0px; list-style: none; margin: 0; - min-width: 180px; + min-width: 100%; padding: 0; position: absolute; top: auto; diff --git a/src/controls/legend.js b/src/controls/legend.js index 2ee170ba2..01f31b784 100644 --- a/src/controls/legend.js +++ b/src/controls/legend.js @@ -480,7 +480,14 @@ const Legend = function Legend(options = {}) { toolsEl.insertBefore(dom.html(divider.render()), toolsEl.firstChild); toolsEl.insertBefore(dom.html(button.render()), toolsEl.firstChild); } else { - toolsEl.appendChild(dom.html(button.render())); + if (typeof button.getValue === 'function') { + const node = document.createElement("div"); + node.classList.add("grow"); + toolsEl.appendChild(node); + node.appendChild(dom.html(button.render())); + } else { + toolsEl.appendChild(dom.html(button.render())); + } } toolsCmp.addComponent(button); button.onRender();