Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting issue on selecting multiple values (Shift+Click) #3

Open
Vickal opened this issue Dec 15, 2017 · 3 comments
Open

Getting issue on selecting multiple values (Shift+Click) #3

Vickal opened this issue Dec 15, 2017 · 3 comments

Comments

@Vickal
Copy link

Vickal commented Dec 15, 2017

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
Copy link

LuciferDoCode commented Jan 23, 2018

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
Copy link

Ko-Sit commented Jan 25, 2018

@LuciferDoCode Just replace "values.length" in 3rd condition to "labels.length"

@LuciferDoCode
Copy link

@Ko-Sit yes!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants