diff --git a/client/src/components/views/ConfigView/BasicVariable.tsx b/client/src/components/views/ConfigView/BasicVariable.tsx index 6e0303a4f..da6c90c1b 100644 --- a/client/src/components/views/ConfigView/BasicVariable.tsx +++ b/client/src/components/views/ConfigView/BasicVariable.tsx @@ -19,10 +19,13 @@ type Props = { }; class BasicVariable extends React.Component { + originalValue = this.props.state.__value; + render() { const { name, path, state } = this.props; const modified = state.__value !== state.__newValue; + const updated = this.originalValue !== state.__newValue; const onChange = (validatedValue: { value: string | number | boolean; @@ -63,14 +66,14 @@ class BasicVariable extends React.Component { case 'int': case 'long': input = ( - + ); break; case 'float': @@ -79,96 +82,111 @@ class BasicVariable extends React.Component { input =

{state.__value}

; } else { input = ( -
- - {state.__valid && ( -

- ({Number(state.__newValue)}) -

- )} -
+ > + + + ); } break; case 'string': input = ( - + ); break; case 'boolean': input = ( - + ); break; case 'enum': input = ( - + ); break; } } return ( - - - + + {input} + + {updated && ( +
+
+ + {`(${this.originalValue})`} + +
+ )} + + ); } } -export default BasicVariable; +export default BasicVariable; \ No newline at end of file