nextuiq
Version:
NextUIQ is a modern, lightweight, and developer-friendly UI component library for React and Next.js. Built with TypeScript and Tailwind CSS, it offers customizable, accessible, and performance-optimized components with built-in dark mode, theme customizat
23 lines (22 loc) • 797 B
TypeScript
interface UseTableProps<T> {
data: T[];
itemsPerPage?: number;
searchFields?: (keyof T)[];
}
export declare function useTable<T>({ data, itemsPerPage, searchFields }: UseTableProps<T>): {
searchTerm: string;
setSearchTerm: import('react').Dispatch<import('react').SetStateAction<string>>;
statusFilter: string;
setStatusFilter: import('react').Dispatch<import('react').SetStateAction<string>>;
roleFilter: string;
setRoleFilter: import('react').Dispatch<import('react').SetStateAction<string>>;
currentPage: number;
setCurrentPage: import('react').Dispatch<import('react').SetStateAction<number>>;
filteredData: T[];
paginatedData: T[];
totalPages: number;
startIndex: number;
endIndex: number;
totalItems: number;
};
export {};