From a0aa08d117f583ee02625b54199952e2c3594907 Mon Sep 17 00:00:00 2001 From: Neto Chaves Date: Sun, 22 Mar 2020 16:48:12 -0300 Subject: [PATCH] fix: types --- .../components/autocomplete/FilterMaxTags.js | 6 ++--- .../components/autocomplete/FilterMaxTags.tsx | 22 ++++++++++--------- .../src/Autocomplete/Autocomplete.js | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/src/pages/components/autocomplete/FilterMaxTags.js b/docs/src/pages/components/autocomplete/FilterMaxTags.js index 60684e901b28b3..8354edf95e82b3 100644 --- a/docs/src/pages/components/autocomplete/FilterMaxTags.js +++ b/docs/src/pages/components/autocomplete/FilterMaxTags.js @@ -4,7 +4,7 @@ import Autocomplete from '@material-ui/lab/Autocomplete'; import { makeStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles((theme) => ({ root: { width: 500, '& > * + *': { @@ -23,9 +23,9 @@ export default function FilterMaxTags() { filterMaxTags={2} id="tags-standard" options={top100Films} - getOptionLabel={option => option.title} + getOptionLabel={(option) => option.title} defaultValue={[top100Films[13], top100Films[12], top100Films[11]]} - renderInput={params => ( + renderInput={(params) => ( )} /> diff --git a/docs/src/pages/components/autocomplete/FilterMaxTags.tsx b/docs/src/pages/components/autocomplete/FilterMaxTags.tsx index bb273f94185484..a64ea509b30b77 100644 --- a/docs/src/pages/components/autocomplete/FilterMaxTags.tsx +++ b/docs/src/pages/components/autocomplete/FilterMaxTags.tsx @@ -1,17 +1,19 @@ /* eslint-disable no-use-before-define */ import React from 'react'; import Autocomplete from '@material-ui/lab/Autocomplete'; -import { makeStyles, Theme } from '@material-ui/core/styles'; +import { makeStyles, createStyles, Theme } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; -const useStyles = makeStyles((theme: Theme) => ({ - root: { - width: 500, - '& > * + *': { - marginTop: theme.spacing(3), +const useStyles = makeStyles((theme: Theme) => + createStyles({ + root: { + width: 500, + '& > * + *': { + marginTop: theme.spacing(3), + }, }, - }, -})); + }), +); export default function FilterMaxTags() { const classes = useStyles(); @@ -23,9 +25,9 @@ export default function FilterMaxTags() { filterMaxTags={2} id="tags-standard" options={top100Films} - getOptionLabel={option => option.title} + getOptionLabel={(option) => option.title} defaultValue={[top100Films[13], top100Films[12], top100Films[11]]} - renderInput={params => ( + renderInput={(params) => ( )} /> diff --git a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js index 4c48804c64b93a..1752ae671bb095 100644 --- a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js +++ b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js @@ -349,7 +349,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) { } } - const defaultRenderGroup = params => ( + const defaultRenderGroup = (params) => (
  • {params.key}