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 {
1313        this . description  =  "" ; 
1414
1515        this . handlePresetSelectClick  =  this . handlePresetSelectClick . bind ( this ) ; 
16+         this . updatePresetDescription  =  this . updatePresetDescription . bind ( this ) ; 
1617    } 
1718
1819    handlePresetSelectClick  =  ( event ,  value )  =>  { 
1920        this . setState ( {  presetSelected : value  } ) ; 
2021
22+         this . updatePresetDescription ( ) ; 
23+ 
24+         if ( this . props . onChanged  !==  null )  { 
25+             this . props . onChange ( value ) ; 
26+         } 
27+     } ; 
28+ 
29+     updatePresetDescription ( )  { 
2130        if ( value  ===  "podman" )  { 
2231            this . description  =  this . props . podmanDescription ; 
2332        } 
2433        if ( value  ===  "openshift" )  { 
2534            this . description  =  this . props . openshiftDescription ; 
2635        } 
27- 
28-         if ( this . props . onChanged  !==  null )  { 
29-             this . props . onChange ( value ) ; 
30-         } 
31-     } ; 
36+     } 
3237
3338    componentWillReceiveProps ( nextProps )  { 
3439        this . setState ( { 
3540           presetSelected : nextProps . value 
3641        } ) 
3742
38-         // handlePresetSelectClick() 
43+         this . updatePresetDescription ( ) ; 
3944      } 
4045
4146    render ( )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments