@arkhas/inertia-datatable
Version:
A Laravel Inertia React Datatable component
21 lines (20 loc) • 885 B
TypeScript
import React from 'react';
import { Column as ColumnType } from "./types";
interface DatatableBodyProps {
columns: ColumnType[];
data: Record<string, React.ReactNode | string | number | boolean | null>[];
selectedRows: (number | string)[];
sort?: string;
direction?: string;
total: number;
onSort: (columnKey: string, direction: string) => void;
onToggleColumnVisibility: (columnKey: string, isVisible: boolean) => void;
onSelectRow: (rowId: number | string) => void;
onSelectAllRows: () => void;
onRowAction: (action: string, rowId: number | string, url?: string, columnKey?: string) => void;
isRowSelected: (rowId: number | string) => boolean;
t: (key: string) => string;
icons?: Record<string, React.ComponentType<React.SVGProps<SVGSVGElement>>>;
}
export declare const DatatableBody: React.FC<DatatableBodyProps>;
export {};