1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +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:
ivaosthu 2019-10-24 16:14:59 +02:00
parent 8ad6f3dc35
commit 9a30b99705

View File

@ -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