norma-library
Version:
Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
47 lines (46 loc) • 1.26 kB
TypeScript
import { ColumnDef } from '@tanstack/react-table';
type Labels = {
orderAsc: string;
orderDesc: string;
filter: string;
clearFilter: string;
};
interface Pagination {
pageIndex: number;
pageSize: number;
}
export interface UncontrolledTableProps {
data: any;
columns: ColumnDef<ColumnsTable>[];
onClick: any;
onMouseOver: any;
onMouseOut: any;
showTotalResults: boolean;
showSettings: boolean;
pagination?: Pagination;
totalPages: number;
showClearFields?: boolean;
customTotalResults?: string;
labels?: Labels;
tableClassName?: string;
stickyHeader?: boolean;
stickyHeaderP?: number;
customIcons?: React.ReactNode[];
hideColumns?: string[];
draggable?: boolean;
onChangePage: (pagination: Pagination) => void;
onClearFieldsClick?: () => void;
onFilterClick?: (column: string) => void;
onSortClick?: (column: string, direction: string) => void;
onColumnVisibilityChange?: (columnId: string, isVisible: boolean) => void;
onDragEnd?: (data: any[]) => void;
}
export interface ColumnsTable {
header: string;
accessorKey: string;
type: string;
enableColumnFilter: boolean;
filterFn: string;
nofilter?: boolean;
}
export {};