Getting issue on selecting multiple values (Shift+Click)
Vickal opened this issue · 3 comments
Vickal commented
I'm getting below message in pop up on selection of multiple option from dropdown.
This page has an error. You might just need to refresh it.
Action failed: c:MultiSelect$controller$handleSelection [values is not defined]
Failing descriptor: {c:MultiSelect$controller$handleSelection}
LuciferDoCode commented
Hi Vickal,
In the helper, there is a method setInfoText, now look at the else If condition.
`setInfoText: function(component, labels) {
if (labels.length == 0) {
component.set("v.infoText", "Select an option...");
}
if (labels.length == 1) {
component.set("v.infoText", labels[0]);
}
else if (values.length > 1) { //this should be else if (labels.length > 1) {
component.set("v.infoText", labels.length + " options selected");
}
},`
Ko-Sit commented
@LuciferDoCode Just replace "values.length" in 3rd condition to "labels.length"
LuciferDoCode commented
@Ko-Sit yes!!