This repository was archived by the owner on Feb 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -13,29 +13,34 @@ export default class PresetSelection extends React.Component {
13
13
this . description = "" ;
14
14
15
15
this . handlePresetSelectClick = this . handlePresetSelectClick . bind ( this ) ;
16
+ this . updatePresetDescription = this . updatePresetDescription . bind ( this ) ;
16
17
}
17
18
18
19
handlePresetSelectClick = ( event , value ) => {
19
20
this . setState ( { presetSelected : value } ) ;
20
21
22
+ this . updatePresetDescription ( ) ;
23
+
24
+ if ( this . props . onChanged !== null ) {
25
+ this . props . onChange ( value ) ;
26
+ }
27
+ } ;
28
+
29
+ updatePresetDescription ( ) {
21
30
if ( value === "podman" ) {
22
31
this . description = this . props . podmanDescription ;
23
32
}
24
33
if ( value === "openshift" ) {
25
34
this . description = this . props . openshiftDescription ;
26
35
}
27
-
28
- if ( this . props . onChanged !== null ) {
29
- this . props . onChange ( value ) ;
30
- }
31
- } ;
36
+ }
32
37
33
38
componentWillReceiveProps ( nextProps ) {
34
39
this . setState ( {
35
40
presetSelected : nextProps . value
36
41
} )
37
42
38
- // handlePresetSelectClick()
43
+ this . updatePresetDescription ( ) ;
39
44
}
40
45
41
46
render ( ) {
You can’t perform that action at this time.
0 commit comments