Legal values
- By defining the legal values the Unleash Admin UI will validate the user input. A concrete
- example would be that we know all values for our “environment” (local, development, stage,
+ By defining the legal values the Unleash Admin UI
+ will validate the user input. A concrete example
+ would be that we know all values for our
+ “environment” (local, development, stage,
production).
@@ -159,6 +223,18 @@ class AddContextComponent extends Component {
label="Value"
name="value"
className={styles.valueField}
+ onFocus={() =>
+ this.setState(prev => ({
+ ...prev,
+ focusedLegalValue: true,
+ }))
+ }
+ onBlur={() =>
+ this.setState(prev => ({
+ ...prev,
+ focusedLegalValue: false,
+ }))
+ }
value={this.state.currentLegalValue}
error={!!errors.currentLegalValue}
helperText={errors.currentLegalValue}
@@ -176,15 +252,28 @@ class AddContextComponent extends Component {
Add
- {contextField.legalValues.map(this.renderLegalValue)}
+
+ {contextField.legalValues.map(
+ this.renderLegalValue
+ )}
+