Merge pull request #934 from getmaxun/table-head
feat: !wrap robots table w table head
This commit is contained in:
@@ -5,7 +5,6 @@ import Table from '@mui/material/Table';
|
|||||||
import TableBody from '@mui/material/TableBody';
|
import TableBody from '@mui/material/TableBody';
|
||||||
import TableCell from '@mui/material/TableCell';
|
import TableCell from '@mui/material/TableCell';
|
||||||
import TableContainer from '@mui/material/TableContainer';
|
import TableContainer from '@mui/material/TableContainer';
|
||||||
import TableHead from '@mui/material/TableHead';
|
|
||||||
import TablePagination from '@mui/material/TablePagination';
|
import TablePagination from '@mui/material/TablePagination';
|
||||||
import TableRow from '@mui/material/TableRow';
|
import TableRow from '@mui/material/TableRow';
|
||||||
import { memo, useCallback, useEffect, useMemo } from "react";
|
import { memo, useCallback, useEffect, useMemo } from "react";
|
||||||
@@ -116,7 +115,6 @@ const LoadingRobotRow = memo(({ row, columns }: any) => {
|
|||||||
|
|
||||||
// Virtualized row component for efficient rendering
|
// Virtualized row component for efficient rendering
|
||||||
const TableRowMemoized = memo(({ row, columns, handlers }: any) => {
|
const TableRowMemoized = memo(({ row, columns, handlers }: any) => {
|
||||||
// If robot is loading, show loading row
|
|
||||||
if (row.isLoading) {
|
if (row.isLoading) {
|
||||||
return <LoadingRobotRow row={row} columns={columns} />;
|
return <LoadingRobotRow row={row} columns={columns} />;
|
||||||
}
|
}
|
||||||
@@ -592,7 +590,6 @@ export const RecordingsTable = ({
|
|||||||
<>
|
<>
|
||||||
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden', marginTop: '15px' }}>
|
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden', marginTop: '15px' }}>
|
||||||
<Table stickyHeader aria-label="sticky table">
|
<Table stickyHeader aria-label="sticky table">
|
||||||
<TableHead>
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
{columns.map((column) => (
|
{columns.map((column) => (
|
||||||
<MemoizedTableCell
|
<MemoizedTableCell
|
||||||
@@ -603,7 +600,6 @@ export const RecordingsTable = ({
|
|||||||
</MemoizedTableCell>
|
</MemoizedTableCell>
|
||||||
))}
|
))}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{visibleRows.map((row) => (
|
{visibleRows.map((row) => (
|
||||||
<TableRowMemoized
|
<TableRowMemoized
|
||||||
|
|||||||
Reference in New Issue
Block a user