From 4db2f095ecbf66553a4c29ad44f5cdd18da33cfd Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Thu, 27 Dec 2018 10:42:07 +0100 Subject: [PATCH] Export IntInput's parse and format functions Feature #master Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/views/run-process-panel/inputs/int-input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/run-process-panel/inputs/int-input.tsx b/src/views/run-process-panel/inputs/int-input.tsx index 78f0d736..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) => value === '' ? '' : 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) => ([ -- 2.30.2