To make a checkbox in LWC checked by default it has to have the "checked" attribute inside the markup and it is not responding on placing value=true or value= false inside the markup. But is there any way to assign a variable that would store the value.
lightning-input class="slds-p-left_xx-large" type="checkbox" label="" onchange={handleChange} checked
I also tried to make the "checked"
attribute a dynamic string variable but that too didn't work.
Basically I want to Select all checkbox clicking on which it will select the other checkboxes. But I am unable to assign any dynamic value to check and uncheck the boxes. Is there any workaround to it for LWC?