mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 20:49:14 +08:00
Merge pull request #18088 from ant-design/fix-noStyle
fix: `noStyle` throws react warning
This commit is contained in:
commit
adc1879048
@ -54,14 +54,14 @@ class TransButton extends React.Component<TransButtonProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { style, noStyle } = this.props;
|
const { style, noStyle, ...restProps } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
ref={this.setRef}
|
ref={this.setRef}
|
||||||
{...this.props}
|
{...restProps}
|
||||||
onKeyDown={this.onKeyDown}
|
onKeyDown={this.onKeyDown}
|
||||||
onKeyUp={this.onKeyUp}
|
onKeyUp={this.onKeyUp}
|
||||||
style={{ ...(!noStyle ? inlineStyle : null), ...style }}
|
style={{ ...(!noStyle ? inlineStyle : null), ...style }}
|
||||||
|
Loading…
Reference in New Issue
Block a user