Skip to content
Snippets Groups Projects
Commit 3e4242c5 authored by Robert Phillips's avatar Robert Phillips
Browse files

Issue #3309894 by robphillips: Support single choice values.

parent 32370b1b
Branches
Tags 1.1.1
No related merge requests found
......@@ -32,12 +32,12 @@
item: "choices__item choices__item--autocomplete",
},
});
if (this.choices.getValue().length) {
if (this.choices.getValue()) {
this.choices.containerOuter.element.classList.add("is-filled");
}
element.addEventListener("change", () => {
this.clear.bind(this);
if (this.choices.getValue().length) {
if (this.choices.getValue()) {
this.choices.containerOuter.element.classList.add("is-filled");
} else {
this.choices.containerOuter.element.classList.remove("is-filled");
......
......@@ -25,14 +25,14 @@
}
});
if (this.choices.getValue().length) {
if (this.choices.getValue()) {
this.choices.containerOuter.element.classList.add("is-filled");
}
element.addEventListener("change", () => {
this.clear.bind(this);
if (this.choices.getValue().length) {
if (this.choices.getValue()) {
this.choices.containerOuter.element.classList.add("is-filled");
} else {
this.choices.containerOuter.element.classList.remove("is-filled");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment