mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-09-30 08:53:15 +00:00
Fix nested tbody in proposal tables: use Fragment instead of Box component="tbody"
This commit is contained in:
parent
b43bb64fff
commit
83e1a7948e
2 changed files with 6 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useMemo, useState } from 'react';
|
||||
import { useMemo, useState, Fragment } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import {
|
||||
|
|
@ -336,7 +336,7 @@ export default function AdminDashboard({ defaultStatus }: { defaultStatus?: stri
|
|||
: grouped.map((group) => {
|
||||
const isExpanded = expanded.has(group.baseNumber);
|
||||
return (
|
||||
<Box component="tbody" key={group.baseNumber}>
|
||||
<Fragment key={group.baseNumber}>
|
||||
{renderRow(group.latest, false, group.hasRevisions, isExpanded, group.baseNumber)}
|
||||
{group.hasRevisions && (
|
||||
<TableRow>
|
||||
|
|
@ -353,7 +353,7 @@ export default function AdminDashboard({ defaultStatus }: { defaultStatus?: stri
|
|||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</Box>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
{!loading && rows.length === 0 && (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useState, useMemo } from 'react';
|
||||
import { useState, useMemo, Fragment } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Box,
|
||||
|
|
@ -275,7 +275,7 @@ export default function ProposalListPage() {
|
|||
: grouped.map((group) => {
|
||||
const isExpanded = expanded.has(group.baseNumber);
|
||||
return (
|
||||
<Box component="tbody" key={group.baseNumber}>
|
||||
<Fragment key={group.baseNumber}>
|
||||
{renderRow(group.latest, false, group.hasRevisions, isExpanded, group.baseNumber)}
|
||||
{group.hasRevisions && (
|
||||
<TableRow>
|
||||
|
|
@ -292,7 +292,7 @@ export default function ProposalListPage() {
|
|||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</Box>
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
{!loading && rows.length === 0 && (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue