Merge pull request #15719 from DJanoskova/master

Button: add default html type + fix switch
This commit is contained in:
偏右 2019-03-29 10:22:20 +08:00 committed by GitHub
commit 1a68d4e11a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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}