function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.
TobyKutlerTobyKutler
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
            </lightning-layout-item>
        </lightning-layout>