mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
Input Search should disable enter button when disabled prop is true, close #10040
This commit is contained in:
parent
74d81c2d07
commit
bd217220bc
@ -40,7 +40,7 @@ export default class Search extends React.Component<SearchProps, any> {
|
||||
}
|
||||
|
||||
getButtonOrIcon() {
|
||||
const { enterButton, prefixCls, size } = this.props;
|
||||
const { enterButton, prefixCls, size, disabled } = this.props;
|
||||
if (!enterButton) {
|
||||
return <Icon className={`${prefixCls}-icon`} type="search" key="searchIcon" />;
|
||||
}
|
||||
@ -59,6 +59,7 @@ export default class Search extends React.Component<SearchProps, any> {
|
||||
className={`${prefixCls}-button`}
|
||||
type="primary"
|
||||
size={size}
|
||||
disabled={disabled}
|
||||
onClick={this.onSearch}
|
||||
key="enterButton"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user