component-library-mustafa-akagunduz
Version:
Air Command System projesi için geliştirilmiş React component kütüphanesi
38 lines (37 loc) • 1.06 kB
TypeScript
import React from 'react';
import './Table.css';
export interface SortConfig {
column: string;
direction: 'asc' | 'desc';
order: number;
}
export interface TableColumn {
key: string;
label: string;
sortable?: boolean;
render?: (value: any, row: any) => React.ReactNode;
width?: string;
}
export interface TableProps {
data: any[];
columns: TableColumn[];
selectedRowId?: string | null;
selectedRowIds?: string[];
sortConfig?: SortConfig[];
totalCount?: number;
showingCount?: number;
onRowSelect?: (rowId: string, row: any, event?: MouseEvent) => void;
onSort?: (columnKey: string) => void;
onShowFilters?: () => void;
onClearSelection?: () => void;
onUpdate?: () => void;
onDelete?: () => void;
onShowHistory?: () => void;
showUpdateDelete?: boolean;
hasSelection?: boolean;
isMultipleSelection?: boolean;
t: (key: string, params?: any) => string;
className?: string;
children?: React.ReactNode;
}
export declare const Table: React.FC<TableProps>;