File tree 2 files changed +2
-11
lines changed
packages/material-ui/src/InputBase
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,7 @@ class InputBase extends React.Component {
172
172
}
173
173
}
174
174
175
- componentDidUpdate ( prevProps ) {
176
- // Book keep the focused state.
177
- if ( ! prevProps . disabled && this . props . disabled ) {
178
- const { muiFormControl } = this . props ;
179
- if ( muiFormControl && muiFormControl . onBlur ) {
180
- muiFormControl . onBlur ( ) ;
181
- }
182
- }
175
+ componentDidUpdate ( ) {
183
176
if ( this . isControlled ) {
184
177
this . checkDirty ( this . props ) ;
185
178
} // else performed in the onChange
Original file line number Diff line number Diff line change @@ -75,8 +75,7 @@ describe('<InputBase />', () => {
75
75
} ) ;
76
76
77
77
it ( 'should reset the focused state' , ( ) => {
78
- const handleBlur = spy ( ) ;
79
- const wrapper = mount ( < InputBase muiFormControl = { { onBlur : handleBlur } } /> ) ;
78
+ const wrapper = mount ( < InputBase /> ) ;
80
79
// We simulate a focused input that is getting disabled.
81
80
setState ( wrapper , {
82
81
focused : true ,
@@ -85,7 +84,6 @@ describe('<InputBase />', () => {
85
84
disabled : true ,
86
85
} ) ;
87
86
assert . strictEqual ( wrapper . find ( 'InputBase' ) . state ( ) . focused , false ) ;
88
- assert . strictEqual ( handleBlur . callCount , 1 ) ;
89
87
} ) ;
90
88
91
89
// IE 11 bug
You can’t perform that action at this time.
0 commit comments