mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: auto-fill groupId paramters
When configuring a gradual-rollout strategy the user has to define the groupId paramter. Usually you just want to set it to the toggle name. This change initalize the value to the toggleName.
This commit is contained in:
		
							parent
							
								
									8ad6f3dc35
								
							
						
					
					
						commit
						9a30b99705
					
				@ -106,7 +106,12 @@ class StrategyConfigure extends React.Component {
 | 
			
		||||
                />
 | 
			
		||||
            );
 | 
			
		||||
        } else {
 | 
			
		||||
            return this.renderInputFields(strategyDefinition);
 | 
			
		||||
            return (
 | 
			
		||||
                <div>
 | 
			
		||||
                    <br />
 | 
			
		||||
                    {this.renderInputFields(strategyDefinition)}
 | 
			
		||||
                </div>
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -124,6 +129,8 @@ class StrategyConfigure extends React.Component {
 | 
			
		||||
                                name={name}
 | 
			
		||||
                                onChange={this.handleConfigChange.bind(this, name)}
 | 
			
		||||
                                value={1 * value}
 | 
			
		||||
                                minLabel="off"
 | 
			
		||||
                                maxLabel="on"
 | 
			
		||||
                            />
 | 
			
		||||
                            {description && <p className={styles.helpText}>{description}</p>}
 | 
			
		||||
                        </div>
 | 
			
		||||
@ -184,6 +191,9 @@ class StrategyConfigure extends React.Component {
 | 
			
		||||
                        </div>
 | 
			
		||||
                    );
 | 
			
		||||
                } else {
 | 
			
		||||
                    if (name === 'groupId' && !value) {
 | 
			
		||||
                        value = this.props.featureToggleName;
 | 
			
		||||
                    }
 | 
			
		||||
                    return (
 | 
			
		||||
                        <div key={name}>
 | 
			
		||||
                            <Textfield
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user