Skip to content

Commit

Permalink
added wrapper element
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyblasta committed Feb 2, 2023
1 parent f4ee7ef commit 3c1b4b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scss/externs/_awesomplete.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
flex-direction: row;
flex-grow: 1;
position: fixed;
min-width: 180px;
min-width: 100%;
}

.awesomplete > input {
Expand All @@ -47,7 +47,7 @@
left: 0px;
list-style: none;
margin: 0;
min-width: 180px;
min-width: 100%;
padding: 0;
position: absolute;
top: auto;
Expand Down
9 changes: 8 additions & 1 deletion src/controls/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3c1b4b8

Please sign in to comment.