+ Start a Discussion
User SethUser Seth 

How to select checkbox when we click anywhere in the Layout

I have one LWC component in it I have Layout which consists of three layout items
1.layout item=checkbox
2.layout item =Text
3.layout item =button
Now I want to select this checkbox when I click anywhere in that layout.
Put an OnClick method at the parent/root element. When that is triggered you can change the value of your checkbox to true or false. 
<lightning-layout onclick = {setCheckBox}>
            <lightning-layout-item padding="around-small">
                //code for inputs