Skip to content

Commit 770c78f

Browse files
authored
Fix error-icon visibility in material array renderers
Fixes #2031
1 parent 708ab2d commit 770c78f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/material/src/complex/TableToolbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
TableRow,
3434
Tooltip
3535
} from '@mui/material';
36-
import { Grid, Hidden, Typography } from '@mui/material';
36+
import { Grid, Typography } from '@mui/material';
3737
import AddIcon from '@mui/icons-material/Add';
3838
import ValidationIcon from './ValidationIcon';
3939
import NoBorderTableCell from './NoBorderTableCell';
@@ -77,14 +77,14 @@ const TableToolbar = React.memo(
7777
<Typography variant={'h6'}>{label}</Typography>
7878
</Grid>
7979
<Grid item>
80-
<Hidden smUp={errors.length === 0}>
80+
{errors.length !== 0 &&
8181
<Grid item>
8282
<ValidationIcon
8383
id='tooltip-validation'
8484
errorMessages={errors}
8585
/>
8686
</Grid>
87-
</Hidden>
87+
}
8888
</Grid>
8989
</Grid>
9090
</NoBorderTableCell>

packages/material/src/layouts/ArrayToolbar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
Grid,
33
IconButton,
4-
Hidden,
54
Toolbar,
65
Tooltip,
76
Typography
@@ -30,11 +29,11 @@ export const ArrayLayoutToolbar = React.memo(
3029
<Grid item>
3130
<Typography variant={'h6'}>{label}</Typography>
3231
</Grid>
33-
<Hidden smUp={errors.length === 0}>
32+
{errors.length !== 0 &&
3433
<Grid item>
3534
<ValidationIcon id='tooltip-validation' errorMessages={errors} />
3635
</Grid>
37-
</Hidden>
36+
}
3837
<Grid item>
3938
<Grid container>
4039
<Grid item>

0 commit comments

Comments
 (0)