mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
Merge pull request #15719 from DJanoskova/master
Button: add default html type + fix switch
This commit is contained in:
commit
1a68d4e11a
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user