diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index dcd9893..204a5b8 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -71,7 +71,7 @@ interface Props { rows: T[], columns?: Column[] | (() => Column[]), title?: string | JSX.Element; - subtitle?: string | JSX.Element; + subtitle?: string | JSX.Element | (() => string | JSX.Element); total: number, pageSize: number, page: number, @@ -98,7 +98,7 @@ export default function ResponsiveTable(props: Props) { setPage, handleRowsPerPageChange, title, - subtitle, + // subtitle, renderGutter, setSearchText, isLoading, @@ -113,6 +113,7 @@ export default function ResponsiveTable(props: Props) { } = props const classes = useStyles(); const columns = typeof(props.columns) === "function" ? props.columns() : props.columns + const subtitle = typeof(props.subtitle) === "function" ? props.subtitle() : props.subtitle const isMobile = useMobile() diff --git a/src/pages/Devices.tsx b/src/pages/Devices.tsx index 994b7d2..1a14378 100644 --- a/src/pages/Devices.tsx +++ b/src/pages/Devices.tsx @@ -452,7 +452,7 @@ export default function Devices() { title={} - subtitle={subtitle()} + subtitle={subtitle} rows={devices} renderGutter={ isMobile ? gutter : undefined } columns={columns}