Propagate event to onChange prop in Switch component

This commit is contained in:
Dominik Prokop 2019-01-29 09:53:45 +01:00
parent 433c88a616
commit 628c5c1da6

View File

@ -14,8 +14,7 @@ export interface Props {
export interface State {
id: any;
}
export class Switch extends PureComponent<Props, State> {
export class Switch extends PureComponent<Props, State> {
state = {
id: _.uniqueId(),
};
@ -23,7 +22,7 @@ export class Switch extends PureComponent<Props, State> {
internalOnChange = (event: React.FormEvent<HTMLInputElement>) => {
event.stopPropagation();
this.props.onChange();
this.props.onChange(event);
};
render() {