Skip to content

Commit

Permalink
Merge pull request #3293 from sagarbakhtar/select-input-resettable-di…
Browse files Browse the repository at this point in the history
…sabled

[RFR] Add disabled prop to clear IconButton in <ResettableTextField>
  • Loading branch information
Gildas Garcia authored Jun 1, 2019
2 parents f358c9e + 7d57973 commit 9d65e6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/ra-ui-materialui/src/input/ResettableTextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ResettableTextField extends Component {
static propTypes = {
classes: PropTypes.object.isRequired,
clearAlwaysVisible: PropTypes.bool,
disabled: PropTypes.bool,
InputProps: PropTypes.object,
onBlur: PropTypes.func,
onChange: PropTypes.func.isRequired,
Expand Down Expand Up @@ -72,6 +73,7 @@ class ResettableTextField extends Component {
InputProps,
value,
resettable,
disabled,
...props
} = this.props;
const { showClear } = this.state;
Expand Down Expand Up @@ -102,6 +104,7 @@ class ResettableTextField extends Component {
disableRipple
onClick={this.handleClickClearButton}
onMouseDown={this.handleMouseDownClearButton}
disabled={disabled}
>
<ClearIcon
className={classNames(clearIcon, {
Expand All @@ -114,6 +117,7 @@ class ResettableTextField extends Component {
),
...InputProps,
}}
disabled={disabled}
{...props}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
Expand Down

0 comments on commit 9d65e6c

Please sign in to comment.