X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8695e9d621330e691fbcc4bbc1d600d91bae2ac6..71b9264c1720e619f8cfcb297a7848ece420c61c:/src/views/run-process-panel/inputs/int-input.tsx diff --git a/src/views/run-process-panel/inputs/int-input.tsx b/src/views/run-process-panel/inputs/int-input.tsx index 32ebeb75..3273f354 100644 --- a/src/views/run-process-panel/inputs/int-input.tsx +++ b/src/views/run-process-panel/inputs/int-input.tsx @@ -22,9 +22,9 @@ export const IntInput = ({ input }: IntInputProps) => format={format} validate={getValidation(input)} />; -const parse = (value: any) => parseInt(value, 10); +export const parse = (value: any) => value === '' ? '' : parseInt(value, 10); -const format = (value: any) => isNaN(value) ? '' : JSON.stringify(value); +export const format = (value: any) => isNaN(value) ? '' : JSON.stringify(value); const getValidation = memoize( (input: IntCommandInputParameter) => ([