UNPKG

@blocktion/json-to-table

Version:

A powerful, modular React component for converting JSON data to navigable tables with advanced features like automatic column detection, theming, and sub-table navigation. Part of the Blocktion SaaS project ecosystem.

27 lines (26 loc) 1.2 kB
import React from "react"; import { Column, EditState, TableOptions } from "../../types"; interface TableBodyProps { data: unknown[]; columns: Column[]; onRowClick?: (row: unknown, index: number) => void; onCellClick?: (value: unknown, column: Column, row: unknown) => void; onNavigateToSubTable: (path: string, value: unknown, title: string, rowIndex?: number) => void; enableNavigation: boolean; showRowNumbers: boolean; customRenderers?: Record<string, (value: unknown, row: unknown) => React.ReactNode>; editState?: EditState; setEditState?: React.Dispatch<React.SetStateAction<EditState>>; onDeleteRow?: (rowIndex: number) => void; onAddRow?: (rowData: unknown, insertIndex?: number) => void; onUpdateField?: (rowIndex: number, field: string, value: unknown) => void; onDeleteField?: (rowIndex: number, field: string) => void; onAddField?: (rowIndex: number, field: string, value: unknown) => void; validateField?: (field: string, value: unknown, row: unknown) => { isValid: boolean; error: string | null; }; options?: TableOptions; } export declare const TableBody: React.FC<TableBodyProps>; export {};