UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

65 lines (64 loc) 1.53 kB
import { GridColumn, GridLoader, GridMethodRef } from "@etsoo/react"; import { DataTypes, IdDefaultType } from "@etsoo/shared"; import React from "react"; import { TableProps } from "@mui/material/Table"; /** * Extended table min width for width-unset column */ export declare const TableExMinWidth: number; /** * Extended table methods ref */ export interface TableExMethodRef<T> extends GridMethodRef<T> { /** * Refresh data */ refresh(): void; } /** * Extended table props */ export type TableExProps<T extends object, D extends DataTypes.Keys<T>> = TableProps & GridLoader<T> & { /** * Alternating colors for odd/even rows */ alternatingColors?: [string?, string?]; /** * Columns */ columns: GridColumn<T>[]; /** * Header cells background color and font color */ headerColors?: [string?, string?]; /** * Id field */ idField?: D; /** * Max height */ maxHeight?: number; /** * Methods */ mRef?: React.Ref<TableExMethodRef<T>>; /** * On items select change */ onSelectChange?: (selectedItems: T[]) => void; /** * Row height */ rowHeight?: number; /** * Header and bottom height */ otherHeight?: number; }; /** * Extended Table * @param props Props * @returns Component */ export declare function TableEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TableExProps<T, D>): import("react/jsx-runtime").JSX.Element;