21128: publicFavorites alt text working Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados-workbench2.git] / src / components / switch-field / switch-field.tsx
index 4541e371a5a2154bbbc26b23ab70572071d65968..0c63a36ca32eeeda80f5b52968034a20ff23bf9d 100644 (file)
@@ -2,13 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
-import { FormFieldProps, FormField } from '~/components/form-field/form-field';
+import React from 'react';
+import { FormFieldProps, FormField } from 'components/form-field/form-field';
 import { Switch } from '@material-ui/core';
 import { SwitchProps } from '@material-ui/core/Switch';
 
 export const SwitchField = ({ switchProps, ...props }: FormFieldProps & { switchProps: SwitchProps }) =>
     <FormField {...props}>
-        {input => <Switch {...switchProps} checked={input.checked} onChange={input.onChange} />}
+        {input => <Switch {...switchProps} checked={input.value} onChange={input.onChange} />}
     </FormField>;