Merge pull request #79 from amhsirak/develop

feat: limit number of rows shown in preview data
This commit is contained in:
Karishma Shukla
2024-10-21 15:59:32 +05:30
committed by GitHub

View File

@@ -163,6 +163,7 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
}} }}
> >
{tableData.length > 0 ? ( {tableData.length > 0 ? (
<>
<TableContainer component={Paper}> <TableContainer component={Paper}>
<Table sx={{ minWidth: 650 }} stickyHeader aria-label="output data table"> <Table sx={{ minWidth: 650 }} stickyHeader aria-label="output data table">
<TableHead> <TableHead>
@@ -173,7 +174,7 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
{tableData.map((row, index) => ( {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => (
<TableRow key={index}> <TableRow key={index}>
{columns.map((column) => ( {columns.map((column) => (
<TableCell key={column}>{row[column]}</TableCell> <TableCell key={column}>{row[column]}</TableCell>
@@ -183,6 +184,8 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
</TableBody> </TableBody>
</Table> </Table>
</TableContainer> </TableContainer>
<span style={{ marginLeft: '15px', marginTop: '10px', fontSize: '12px' }}>Additional rows of data will be extracted once you finish recording. </span>
</>
) : ( ) : (
<Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}> <Grid container justifyContent="center" alignItems="center" style={{ height: '100%' }}>
<Grid item> <Grid item>