Skip to content

Commit 9fcb41a

Browse files
jvorcakclaude
andcommitted
fix(consumers): correct consumer-group list pagination layout
Two layout fixes surfaced by the group list page: - group-list rendered its table inside ListLayoutContent (flex-1), which grew to fill the min-h-screen layout and pushed the pagination bar to the bottom of the viewport. Render <Table> directly like the other list pages so pagination sits under the last row. - ListLayoutPagination did not stretch its child, so DataTablePagination collapsed to content width and its internal justify-between clustered the controls on the left. Add [&>*]:w-full so the controls span the row (also fixes topics/quotas/users/roles list pages). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 06f67b7 commit 9fcb41a

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

frontend/src/components/pages/consumers/group-list.tsx

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from 'components/redpanda-ui/components/empty';
3030
import {
3131
ListLayout,
32-
ListLayoutContent,
3332
ListLayoutFilters,
3433
ListLayoutPagination,
3534
ListLayoutSearchInput,
@@ -330,26 +329,24 @@ const GroupList: FC = () => {
330329
/>
331330
</ListLayoutFilters>
332331

333-
<ListLayoutContent>
334-
<Table>
335-
<TableHeader>
336-
{table.getHeaderGroups().map((headerGroup) => (
337-
<TableRow key={headerGroup.id}>
338-
{headerGroup.headers.map((header) => {
339-
type Meta = { align?: 'right'; headWidth?: 'auto' | 'sm' | 'md' | 'lg' | 'xl' | 'fit' | 'full' };
340-
const meta = header.column.columnDef.meta as Meta | undefined;
341-
return (
342-
<TableHead align={meta?.align} key={header.id} width={meta?.headWidth}>
343-
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
344-
</TableHead>
345-
);
346-
})}
347-
</TableRow>
348-
))}
349-
</TableHeader>
350-
<TableBody>{renderBody()}</TableBody>
351-
</Table>
352-
</ListLayoutContent>
332+
<Table>
333+
<TableHeader>
334+
{table.getHeaderGroups().map((headerGroup) => (
335+
<TableRow key={headerGroup.id}>
336+
{headerGroup.headers.map((header) => {
337+
type Meta = { align?: 'right'; headWidth?: 'auto' | 'sm' | 'md' | 'lg' | 'xl' | 'fit' | 'full' };
338+
const meta = header.column.columnDef.meta as Meta | undefined;
339+
return (
340+
<TableHead align={meta?.align} key={header.id} width={meta?.headWidth}>
341+
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
342+
</TableHead>
343+
);
344+
})}
345+
</TableRow>
346+
))}
347+
</TableHeader>
348+
<TableBody>{renderBody()}</TableBody>
349+
</Table>
353350

354351
<ListLayoutPagination>
355352
<DataTablePagination table={table} />

frontend/src/components/redpanda-ui/components/list-layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ interface ListLayoutPaginationProps extends React.HTMLAttributes<HTMLDivElement>
169169
const ListLayoutPagination = React.forwardRef<HTMLDivElement, ListLayoutPaginationProps>(
170170
({ className, children, ...props }, ref) => (
171171
<div
172-
className={cn('flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between', className)}
172+
className={cn(
173+
'flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between [&>*]:w-full',
174+
className
175+
)}
173176
ref={ref}
174177
{...props}
175178
>

0 commit comments

Comments
 (0)