Activity Forums Salesforce® Discussions How can i create a checkbox to select all the below checkbox in salesforce lightning component?

  • Piyush

    Member
    November 5, 2019 at 6:00 am

    Hi,

    1. Each of the checkboxes just needs to be given the same name.
    2. The ‘Select All’ checkbox needs to have an onchange event, and be bound to an aura attribute, which holds the current status.
    3. The onchange event first needs to change the aura attribute to be the opposite of its current value.
    4. Do a component.find(‘checkboxname’), and you’ll receive an array of the components which you can then…
    5. Loop through to set the checked value.

    For more refer to:- https://www.sfdcpaul.com/lightning-checkboxes-select-all/

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos