add default html type + fix switch

This commit is contained in:
Dana Janoskova 2019-03-28 09:58:37 +01:00
parent a83b7dc516
commit a543c7db6a

View File

@ -90,6 +90,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
loading: false,
ghost: false,
block: false,
htmlType: 'button',
};
static propTypes = {
@ -219,6 +220,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
break;
case 'small':
sizeCls = 'sm';
break;
default:
break;
}
@ -265,7 +267,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
<Wave>
<button
{...otherProps as NativeButtonProps}
type={htmlType || 'button'}
type={htmlType}
className={classes}
onClick={this.handleClick}
ref={this.saveButtonRef}