Skip to content

Commit

Permalink
fix row not showing up and minor ui issue
Browse files Browse the repository at this point in the history
  • Loading branch information
miki-tebe committed Jun 14, 2024
1 parent 59ab4a3 commit 7c9b47d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
44 changes: 23 additions & 21 deletions ui/src/components/ui/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,29 @@ export function DataTable<TData, TValue>({
Next
</Button>
</div>
<Select
onValueChange={(pageSize) => table.setPageSize(Number(pageSize))}
defaultValue="10"
>
<SelectTrigger className="text-sm">
<SelectValue>
Rows per page: {table.getState().pagination.pageSize}
</SelectValue>
</SelectTrigger>
<SelectContent>
{[10, 20, 30, 40, 50, 100].map((pageSize) => (
<SelectItem
key={pageSize}
onClick={() => table.setPageSize(pageSize)}
value={String(pageSize)}
>
{pageSize}
</SelectItem>
))}
</SelectContent>
</Select>
<div>
<Select
onValueChange={(pageSize) => table.setPageSize(Number(pageSize))}
defaultValue="10"
>
<SelectTrigger className="text-sm">
<SelectValue>
Rows per page: {table.getState().pagination.pageSize}
</SelectValue>
</SelectTrigger>
<SelectContent>
{[10, 20, 30, 40, 50, 100].map((pageSize) => (
<SelectItem
key={pageSize}
onClick={() => table.setPageSize(pageSize)}
value={String(pageSize)}
>
{pageSize}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/routes/tables.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Table({ name }: Props) {
[key: string]: string;
};
const columns: ColumnDef<Column>[] = data.columns.map((col) => ({
accessorKey: col.toLowerCase(),
accessorKey: col,
header: col,
}));
const rows = data.rows.map((row) =>
Expand Down

0 comments on commit 7c9b47d

Please sign in to comment.