Extract BooleanInput normalize function
[arvados.git] / src / views / run-process-panel / inputs / boolean-input.tsx
index 5da547423bb94155cf825645f52d057ec0c93449..d3b93662bc119fadb3ffb77d56a4c76e39dd9b35 100644 (file)
@@ -16,9 +16,11 @@ export const BooleanInput = ({ input }: BooleanInputProps) =>
         name={input.id}
         commandInput={input}
         component={BooleanInputComponent}
-        normalize={(value, prevValue) => !prevValue}
+        normalize={normalize}
     />;
 
+const normalize = (_: any, prevValue: boolean) => !prevValue;
+
 const BooleanInputComponent = (props: GenericInputProps) =>
     <GenericInput
         component={Input}