name={input.id}
commandInput={input}
component={InputComponent}
- parse={value => parseInt(value, 10)}
- format={value => isNaN(value) ? '' : JSON.stringify(value)}
+ parse={parse}
+ format={format}
validate={[
isRequiredInput(input)
? isInteger
: () => undefined,
]} />;
+const parse = (value: any) => parseInt(value, 10);
+
+const format = (value: any) => isNaN(value) ? '' : JSON.stringify(value);
+
const InputComponent = (props: GenericInputProps) =>
<GenericInput
component={Input}