You need to sign in to do that
Don't have an account?

I need to unchecked the checkbox if second checkbox is clicked and vice-versa i need to change this on exiting lightning controller
Hi Everyone,
I have a Lightning component and contoller which have 2 group check boxes.
but now user able to select both checkboxes but we need it to change when a user select one the other one should get unchecked.
below are the Lightning controler for that. please let me know where to change and should i change anything anything on component also ?
******************
({
doInit : function (component,event,helper) {
var action = component.get("c.initApp");
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
component.set('v.pllist4',response.getReturnValue());
component.set("v.sobjDetail.Technology__c",true);
}
else if (state === "INCOMPLETE") {
}
else if (state === "ERROR") {
var errors = response.getError();
if (errors) {
if (errors[0] && errors[0].message) {
console.log("Error message: " +
errors[0].message);
}
} else {
console.log("Unknown error");
}
}
});
$A.enqueueAction(action);
},
****************************
Greeting to you!
I have written a component and controller as per your requirement it contains two checkbox if you click one one checkbox it will show selected checkbox value
and disable the other checkbox and vice-versa.
checkbox.cmp -------------
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
Can you email me once, i will send you my controller and cmp to you.
nagendra.snowfall@gmail.com