Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material ui v4 #758

Merged
merged 5 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.58",
"@docusaurus/preset-classic": "2.0.0-alpha.58",
"@material-ui/core": "4.9.9",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"@types/classnames": "2.2.10",
"@types/enzyme": "3.10.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/uniforms-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"src/*.tsx"
],
"peerDependencies": {
"@material-ui/core": "^4.0.0 || ^3.0.0 || ^1.2.0",
"@material-ui/core": "^4.0.0",
"react": "^16.8.0"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion 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';
kestarumper marked this conversation as resolved.
Show resolved Hide resolved
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>;
kestarumper marked this conversation as resolved.
Show resolved Hide resolved
}
>;

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 || ''}
kestarumper marked this conversation as resolved.
Show resolved Hide resolved
>
{allowedValues?.map(item => (
<FormControlLabel
Expand Down
3 changes: 2 additions & 1 deletion packages/uniforms-material/src/SelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const xor = (item, array) => {
return array.slice(0, index).concat(array.slice(index + 1));
};

// eslint-disable-next-line complexity
function Select(props: SelectFieldProps) {
const value = props.value ?? '';
if (props.checkboxes) {
Expand Down Expand Up @@ -126,7 +127,7 @@ function Select(props: SelectFieldProps) {
name={name}
// FIXME: There's a problem with SelectFieldProps.
onChange={() => disabled || onChange!(xor(item, value))}
ref={inputRef}
inputRef={inputRef}
kestarumper marked this conversation as resolved.
Show resolved Hide resolved
value={name}
{...filteredProps}
/>
Expand Down
Loading