diff --git a/packages/core/src/components/CheckboxTree/CheckboxTree.tsx b/packages/core/src/components/CheckboxTree/CheckboxTree.tsx index f0d1135918..31fefda204 100644 --- a/packages/core/src/components/CheckboxTree/CheckboxTree.tsx +++ b/packages/core/src/components/CheckboxTree/CheckboxTree.tsx @@ -41,15 +41,15 @@ const useStyles = makeStyles((theme: Theme) => '&:hover': { backgroundColor: 'transparent', }, - '&:active' : { + '&:active': { animation: 'none', - transform: 'none' + transform: 'none', }, }, nested: { paddingLeft: theme.spacing(5), height: '32px', - '&:hover' : { + '&:hover': { backgroundColor: 'transparent', }, }, @@ -57,16 +57,16 @@ const useStyles = makeStyles((theme: Theme) => minWidth: 10, }, listItem: { - '&:hover' : { + '&:hover': { backgroundColor: 'transparent', }, }, text: { '& span, & svg': { fontWeight: 'normal', - fontSize: 14 - } - } + fontSize: 14, + }, + }, }), ); @@ -198,7 +198,6 @@ const indexer = ( }; }, {}); - export const CheckboxTree = (props: CheckboxTreeProps) => { const { onChange } = props; const classes = useStyles(); @@ -225,76 +224,79 @@ export const CheckboxTree = (props: CheckboxTreeProps) => {
{props.label} - {Object.values(state).map(item => -
- - dispatch({ - type: 'checkCategory', - payload: item.label, - }) - } - > - - - - - {Object.values(item.options).length ? ( - <> - {item.isOpen ? ( - handleOpen(event, item.label)} + {Object.values(state).map(item => ( +
+ + dispatch({ + type: 'checkCategory', + payload: item.label, + }) + } + > + + + + + {Object.values(item.options).length ? ( + <> + {item.isOpen ? ( + handleOpen(event, item.label)} + /> + ) : ( + handleOpen(event, item.label)} + /> + )} + + ) : null} + + + + {Object.values(item.options).map(option => ( + + dispatch({ + type: 'checkOption', + payload: { + subCategoryLabel: item.label, + optionLabel: option.label, + }, + }) + } + > + + - ) : ( - handleOpen(event, item.label)} - /> - )} - - ) : null} - - - - {Object.values(item.options).map(option => ( - - dispatch({ - type: 'checkOption', - payload: { - subCategoryLabel: item.label, - optionLabel: option.label, - }, - }) - } - > - - - - - - ))} - - -
- )} + + +
+ ))} + + +
+ ))}
); diff --git a/packages/core/src/components/Select/Select.tsx b/packages/core/src/components/Select/Select.tsx index c1f393f151..a04c616a7c 100644 --- a/packages/core/src/components/Select/Select.tsx +++ b/packages/core/src/components/Select/Select.tsx @@ -30,7 +30,7 @@ import { Chip, Typography, Checkbox, - ClickAwayListener + ClickAwayListener, } from '@material-ui/core'; import ClosedDropdown from './static/ClosedDropdown'; @@ -121,20 +121,20 @@ export const SelectComponent = (props: SelectProps) => { const selectHandleOnOpen = () => { setCanOpen(previous => { if (multiple) { - return true + return true; } - return !previous + return !previous; }); }; const handleClickAway = (event: React.ChangeEvent) => { - if (event.target.id !== "menu-item") { + if (event.target.id !== 'menu-item') { setCanOpen(false); } - } + }; const handleDelete = (selectedValue: string | number) => () => { - const newValue = (value as any[]).filter(chip => chip !== selectedValue) + const newValue = (value as any[]).filter(chip => chip !== selectedValue); setValue(newValue); onChange(newValue); }; @@ -143,71 +143,69 @@ export const SelectComponent = (props: SelectProps) => {
{label} - - - + + +
); diff --git a/packages/core/src/components/Table/Filters.tsx b/packages/core/src/components/Table/Filters.tsx index e11736604b..b797783857 100644 --- a/packages/core/src/components/Table/Filters.tsx +++ b/packages/core/src/components/Table/Filters.tsx @@ -32,7 +32,7 @@ const useSubvalueCellStyles = makeStyles(theme => ({ }, value: { fontWeight: 'bold', - fontSize: 18 + fontSize: 18, }, header: { display: 'flex', diff --git a/packages/core/src/components/Table/Table.tsx b/packages/core/src/components/Table/Table.tsx index ace5aa3fac..4ab5dcd6f5 100644 --- a/packages/core/src/components/Table/Table.tsx +++ b/packages/core/src/components/Table/Table.tsx @@ -135,8 +135,8 @@ const useFilterStyles = makeStyles(() => ({ }, title: { fontWeight: 'bold', - fontSize: 18 - } + fontSize: 18, + }, })); const useTableStyles = makeStyles(() => ({