UNPKG

tanstack-shadcn-table

Version:

A powerful, feature-rich React table component built on top of TanStack Table v8 with shadcn/ui styling. Optimized bundle size with 55% reduction through peer dependencies.

31 lines (30 loc) 1.24 kB
import { FilterFn, SortingFn } from "@tanstack/react-table"; import { TableOptions } from "../../../types/types"; import { RankingInfo } from "@tanstack/match-sorter-utils"; import { fuzzyFilter, fuzzySort } from "./actions"; import React from "react"; declare module "@tanstack/react-table" { interface FilterFns { fuzzy: FilterFn<unknown>; } interface FilterMeta { itemRank: RankingInfo; } interface SortingFns { fuzzy: SortingFn<unknown>; } } export type DataTableProps<TData> = { tableOptions: TableOptions<TData>; className?: string; TableComponent?: React.ElementType; TableHeaderComponent?: React.ElementType; TableRowComponent?: React.ElementType; TableCellComponent?: React.ElementType; TableHeadComponent?: React.ElementType; TableBodyComponent?: React.ElementType; TableFooterComponent?: React.ElementType; }; export declare function DataTable<TData>({ tableOptions, className, TableComponent, TableHeaderComponent, TableHeadComponent, TableRowComponent, TableCellComponent, TableBodyComponent, TableFooterComponent, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element; export default DataTable; export { fuzzyFilter, fuzzySort };