0

I have below component, however I am not getting console logs from the method, I need to get the value of the checkbox getting called.

                        <ul class="ks-cboxtags">
                        <li ><span onclick="{!c.addStatusFilter}"><input type="checkbox" id="checkboxOne" value="Paid"  /><label for="checkboxOne">Paid</label></span></li>
                        <li><input type="checkbox" id="checkboxTwo" value="Pending" onchange="{!c.addStatusFilter}" /><label for="checkboxTwo">Pending</label></li>
                        <li><input type="checkbox" id="checkboxThree" value="Rejected" onchange="{!c.addStatusFilter}" /><label for="checkboxThree">Rejected</label></li>
                        <li><input type="checkbox" id="checkboxFour" value="Declined" onchange="{!c.addStatusFilter}" /><label for="checkboxFour">Declined</label></li>
                    </ul>

I have tried: span onchange onclick

Below is code from controller js

addStatusFilter:function(component,event,helper){
    alert('Add filter');
    console.log('Inside add Status Filter');
    //var btnValue = event.getSource().get("v.value");
    console.log('btnValue---->'+btnValue);
    applyStatusFilter(component,event,helper);
},
addStatusFilter:function(component,event,helper){
}
3
  • You didn't actually share the method, so we can't really help you. Generally speaking, this works just fine. If you edit your question to include more code, we can help.
    – sfdcfox
    Jun 5 '20 at 13:32
  • Hi sir, added code. I have some custom styles as well.codepen.io/quinlo/pen/…
    – mvk1991
    Jun 5 '20 at 13:35
  • anyways I got the issue,I have two methods with same name.. I changed the name of second, it's working now. @sfdcfox any idea how can I load icons in css. I have asked separate question for it with FontAwesome titles salesforce.stackexchange.com/questions/308467/…
    – mvk1991
    Jun 5 '20 at 13:44

Your Answer

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

Browse other questions tagged or ask your own question.