Skip to content

Commit

Permalink
Fix error-icon visibility in material array renderers
Browse files Browse the repository at this point in the history
Fixes #2031
  • Loading branch information
LukasBoll authored Nov 7, 2022
1 parent 708ab2d commit 770c78f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/material/src/complex/TableToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
TableRow,
Tooltip
} from '@mui/material';
import { Grid, Hidden, Typography } from '@mui/material';
import { Grid, Typography } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';
import ValidationIcon from './ValidationIcon';
import NoBorderTableCell from './NoBorderTableCell';
Expand Down Expand Up @@ -77,14 +77,14 @@ const TableToolbar = React.memo(
<Typography variant={'h6'}>{label}</Typography>
</Grid>
<Grid item>
<Hidden smUp={errors.length === 0}>
{errors.length !== 0 &&
<Grid item>
<ValidationIcon
id='tooltip-validation'
errorMessages={errors}
/>
</Grid>
</Hidden>
}
</Grid>
</Grid>
</NoBorderTableCell>
Expand Down
5 changes: 2 additions & 3 deletions packages/material/src/layouts/ArrayToolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Grid,
IconButton,
Hidden,
Toolbar,
Tooltip,
Typography
Expand Down Expand Up @@ -30,11 +29,11 @@ export const ArrayLayoutToolbar = React.memo(
<Grid item>
<Typography variant={'h6'}>{label}</Typography>
</Grid>
<Hidden smUp={errors.length === 0}>
{errors.length !== 0 &&
<Grid item>
<ValidationIcon id='tooltip-validation' errorMessages={errors} />
</Grid>
</Hidden>
}
<Grid item>
<Grid container>
<Grid item>
Expand Down

0 comments on commit 770c78f

Please sign in to comment.