mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
wrapping some agent components.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import {useEffect} from "react";
|
||||
import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from "@/components/ui/select";
|
||||
import {cn} from "@/lib/utils";
|
||||
|
||||
@@ -12,8 +13,12 @@ export const TablePaginationSize = (props: tablePaginationSizeProps) => {
|
||||
|
||||
const {className, table, pageSizeOptions = [10, 20, 30, 40, 50]} = props
|
||||
|
||||
useEffect(() => {
|
||||
table.setPageSize(Number(pageSizeOptions[0]))
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className={cn("flex items-center space-x-2", className)}>
|
||||
<div className={cn("flex items-center justify-center space-x-2", className)}>
|
||||
<p className="whitespace-nowrap text-sm font-medium">Rows per page</p>
|
||||
<Select
|
||||
value={`${table.getState().pagination.pageSize}`}
|
||||
|
||||
Reference in New Issue
Block a user