responsive columns can now be a column type or a function the returns the type
This commit is contained in:
parent
80683e29e5
commit
d66dc68495
4 changed files with 12 additions and 14 deletions
|
|
@ -303,15 +303,15 @@ export default function Devices() {
|
|||
render: (device: Device) => {
|
||||
if (device.status.plenum?.temperature) {
|
||||
return (
|
||||
<Grid2 container direction="column" margin={1} marginLeft={2}>
|
||||
<Grid2 container direction="column" marginLeft={2}>
|
||||
<Grid2>
|
||||
<Typography variant="body2" style={{ color: orange[300]}}>
|
||||
{device.status.plenum.temperature}°C
|
||||
{device.status.plenum.temperature.toFixed(1)}°C
|
||||
</Typography>
|
||||
</Grid2>
|
||||
<Grid2>
|
||||
<Typography variant="body2" color="info">
|
||||
{device.status.plenum.humidity}%
|
||||
{device.status.plenum.humidity.toFixed(1)}%
|
||||
</Typography>
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
|
|
@ -405,7 +405,7 @@ export default function Devices() {
|
|||
</Typography>
|
||||
</Grid2>
|
||||
<Grid2 >
|
||||
<Typography marginRight={1}>
|
||||
<Typography style={{ marginRight: 6 }}>
|
||||
{", "}
|
||||
</Typography>
|
||||
</Grid2>
|
||||
|
|
@ -454,8 +454,8 @@ export default function Devices() {
|
|||
title={<SmartBreadcrumb prependPaths={getGroup() && ["groups", getGroup().id().toString()]} groupName={getGroup() && getGroup().name()} paddingBottom={1}/>}
|
||||
subtitle={subtitle()}
|
||||
rows={devices}
|
||||
renderGutter={gutter}
|
||||
columns={columns()}
|
||||
renderGutter={ isMobile ? gutter : undefined }
|
||||
columns={columns}
|
||||
renderMobile={mobile}
|
||||
total={total}
|
||||
pageSize={limit}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue