1

I want get last value in checkboxgroup. I try using cmp.find("mygroup").get("v.value") but it get all value.

3

If I understand correctly, you want to get last selected value of array of all selected checkboxes

var selectedValues = cmp.find("mygroup").get("v.value");
if(selectedValues.length != 0){
    var lastSelectedValue = selectedValues[selectedValues.length - 1]; //  desired result
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.