File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
examples/CustomPicker/ModalPickerImage Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ export default class ModalPicker extends BaseComponent {
62
62
this . setState ( { cancelText : this . props . cancelText } ) ;
63
63
}
64
64
65
- componentWillReceiveProps ( nextProps ) {
66
- this . setState ( { data : nextProps . data } ) ;
65
+ componentDidUpdate ( ) {
66
+ this . setState ( { data : this . props . data } ) ;
67
67
}
68
68
69
69
onChange ( item ) {
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ export default class CountryPicker extends Component {
33
33
this . onValueChange = this . onValueChange . bind ( this ) ;
34
34
}
35
35
36
- componentWillReceiveProps ( nextProps ) {
36
+ componentDidUpdate ( ) {
37
37
this . setState ( {
38
- selectedCountry : nextProps . selectedCountry ,
38
+ selectedCountry : this . props . selectedCountry ,
39
39
} ) ;
40
40
}
41
41
Original file line number Diff line number Diff line change @@ -38,14 +38,14 @@ export default class PhoneInput extends Component {
38
38
} ;
39
39
}
40
40
41
- componentWillMount ( ) {
41
+ componentDidMount ( ) {
42
42
if ( this . props . value ) {
43
43
this . updateFlagAndFormatNumber ( this . props . value ) ;
44
44
}
45
45
}
46
46
47
- componentWillReceiveProps ( nextProps ) {
48
- const { value, disabled } = nextProps ;
47
+ componentDidUpdate ( ) {
48
+ const { value, disabled } = this . props ;
49
49
this . setState ( { disabled } ) ;
50
50
51
51
if ( value && value !== this . state . value ) {
You can’t perform that action at this time.
0 commit comments