17585: Project change should trigger loader
[arvados-workbench2.git] / src / views / run-process-panel / inputs / boolean-input.tsx
index 04d702fdd0f5207ef2fa01643363033612b8652e..c8ef88503e765a932df0b016f5cf45fe8d191638 100644 (file)
@@ -2,9 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { memoize } from 'lodash/fp';
-import { BooleanCommandInputParameter } from '~/models/workflow';
+import { BooleanCommandInputParameter } from 'models/workflow';
 import { Field } from 'redux-form';
 import { Switch } from '@material-ui/core';
 import { GenericInputProps, GenericInput } from './generic-input';
@@ -27,12 +27,12 @@ const BooleanInputComponent = (props: GenericInputProps) =>
         component={Input}
         {...props} />;
 
-const Input = (props: GenericInputProps) =>
+const Input = ({ input, commandInput }: GenericInputProps) =>
     <Switch
         color='primary'
-        checked={props.input.value}
-        onChange={handleChange(props.input.onChange, props.input.value)}
-        disabled={props.commandInput.disabled} />;
+        checked={input.value}
+        onChange={handleChange(input.onChange, input.value)}
+        disabled={commandInput.disabled} />;
 
 const handleChange = memoize(
     (onChange: (value: string) => void, value: string) => () => onChange(value)