Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6231: Checkbox onClick TS def #6485

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion components/lib/checkbox/checkbox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ interface CheckboxChangeEvent extends FormEvent {}
* Defines valid properties in Checkbox component. In addition to these, all properties of HTMLDivElement can be used in this component.
* @group Properties
*/
export interface CheckboxProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLDivElement>, 'onChange' | 'ref'> {
export interface CheckboxProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLDivElement>, 'onChange' | 'onClick' | 'ref'> {
/**
* Unique identifier of the element.
*/
Expand Down Expand Up @@ -178,6 +178,11 @@ export interface CheckboxProps extends Omit<React.DetailedHTMLProps<React.InputH
* @type {TooltipOptions}
*/
tooltipOptions?: TooltipOptions | undefined;
/**
* Callback to invoke on click.
* @param {React.MouseEvent<HTMLInputElement> & { target: HTMLInputElement }} event - click event
*/
onClick?(event: React.MouseEvent<HTMLInputElement> & { target: HTMLInputElement }): void;
/**
* Callback to invoke on value change
* @param {CheckboxChangeEvent} event - Custom change event
Expand Down
Loading