-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Component
Checkbox
Is your feature request related to a problem? Please describe.
Currently, when a Checkbox component is used within a div that also contains a Label, clicking the label can trigger the onClick event on the parent div twice. This double-triggering occurs because the Checkbox and its Label are separate interactive elements, and their click events can both bubble up to the parent container. This behavior is problematic because it can lead to unintended actions or redundant state updates, making it difficult to reliably manage user interactions.
Describe the solution you'd like
To solve this problem, I propose adding a new onClick prop directly to the Checkbox component. This prop would allow developers to handle click events specifically on the checkbox itself, preventing the need for wrapping it in a parent div to capture clicks.
Describe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
yes
Additional context
No response