- format={value => isNaN(value) ? '' : JSON.stringify(value)}
- validate={[
- isRequiredInput(input)
- ? isNumber
- : () => undefined,]} />;
+ format={format}
+ validate={getValidation(input)} />;
+
+const format = (value: any) => isNaN(value) ? '' : JSON.stringify(value);
+
+const getValidation = memoize(
+ (input: FloatCommandInputParameter) => ([
+ isRequiredInput(input)
+ ? isNumber
+ : () => undefined,])
+);