'use no memo'; 'use client'; import { useCallback } from 'react'; import { type Table } from '@tanstack/react-table'; import { prefixes } from '@/utils/constants'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../input/select'; interface SelectPaginationProps { id?: string; table: Table; paginationOptions: number[]; onChange?: (newValue: number) => void; } export function SelectPagination({ id, table, paginationOptions, onChange }: SelectPaginationProps) { const handlePaginationOptionsChange = useCallback( (newValue: string) => { const perPage = Number(newValue); table.setPageSize(perPage); onChange?.(perPage); }, [table, onChange] ); return ( ); }