- handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
- const [base, fraction] = event.target.value.split('.');
- this.setState({ endsWithDecimalSeparator: fraction === '' });
- this.props.input.onChange(event);
- }
+const getValidation = memoize(
+ (input: FloatCommandInputParameter) => ([
+ isRequiredInput(input)
+ ? isNumber
+ : () => undefined,])
+);
+
+const Input = (props: GenericInputProps) =>
+ <GenericInput
+ component={InputComponent}
+ {...props} />;
+
+const InputComponent = ({ input, meta, commandInput }: GenericInputProps) =>
+ <FloatInputComponent
+ fullWidth
+ error={meta.touched && !!meta.error}
+ disabled={commandInput.disabled}
+ {...input} />;