Skip to content

Commit

Permalink
Fixed error.
Browse files Browse the repository at this point in the history
  • Loading branch information
kestarumper committed Jul 2, 2020
1 parent acfe5fe commit 8886c5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14,620 deletions.
5 changes: 3 additions & 2 deletions packages/uniforms-material/src/BoolField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Checkbox, { CheckboxProps } from '@material-ui/core/Checkbox';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import FormGroup from '@material-ui/core/FormGroup';
import FormLabel from '@material-ui/core/FormLabel';
import React, { ReactNode } from 'react';
import React, { ReactNode, RefObject } from 'react';
import Switch, { SwitchProps } from '@material-ui/core/Switch';
import { connectField, filterDOMProps, Override } from 'uniforms';

Expand All @@ -17,6 +17,7 @@ export type BoolFieldProps = Override<
legend?: string;
onChange?(value: any): void;
transform?(label: string): string;
inputRef?: RefObject<HTMLButtonElement>;
}
>;

Expand Down Expand Up @@ -52,7 +53,7 @@ function Bool(props: BoolFieldProps) {
onChange={event =>
!disabled && onChange && onChange(event.target.checked)
}
inputRef={inputRef}
ref={inputRef}
value={name}
{...filteredProps}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/uniforms-material/src/RadioField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Radio({
name={name}
onChange={(event: any) => disabled || onChange(event.target.value)}
ref={inputRef}
value={value}
value={value || ''}
>
{allowedValues?.map(item => (
<FormControlLabel
Expand Down
Loading

0 comments on commit 8886c5e

Please sign in to comment.