Skip to content

Commit 1c442dc

Browse files
committed
True mobile layout with responsive table rows (sticky header)
1 parent dadd10f commit 1c442dc

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

frontend/src/components/SiteContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ interface Props {
22
children: React.ReactNode;
33
}
44
export function SiteContainer({ children }: Props) {
5-
return <div className="container-xl py-3">{children}</div>;
5+
return <div className="container-xl py-3 min-w-0 overflow-x-auto">{children}</div>;
66
}

frontend/src/components/SiteHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function SiteHeader() {
2525
>
2626
<span className="navbar-toggler-icon" />
2727
</button>
28-
<div className="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
28+
<div className="navbar-brand navbar-brand-autodark pe-0 pe-md-3">
2929
<NavLink to="/">
3030
<div className={styles.logo}>
3131
<img

frontend/src/components/Table/TableLayout.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ interface TableLayoutProps<TFields> {
1212
function TableLayout<TFields>(props: TableLayoutProps<TFields>) {
1313
const hasRows = props.tableInstance.getRowModel().rows.length > 0;
1414
return (
15-
<table className="table table-vcenter table-selectable mb-0">
16-
{hasRows ? <TableHeader tableInstance={props.tableInstance} /> : null}
17-
<TableBody {...props} />
18-
</table>
15+
<div className="table-responsive">
16+
<table className="table table-vcenter table-selectable mb-0">
17+
{hasRows ? <TableHeader tableInstance={props.tableInstance} /> : null}
18+
<TableBody {...props} />
19+
</table>
20+
</div>
1921
);
2022
}
2123

0 commit comments

Comments
 (0)