UNPKG

drf-react-by-schema

Version:

Components and Tools for building a React App having Django Rest Framework (DRF) as server

66 lines 2.52 kB
import React from 'react'; import { GridRowId, GridRenderCellParams } from '@mui/x-data-grid'; import { SxProps } from '@mui/material'; import { Item, SchemaType, Id, GridEnrichedBySchemaColDef, PaginationModel, ActionType, OnSelectActions, OptionsAC, FormFieldLayout, CustomAction, LinkComponentType } from '../../@types'; import { OnEditModelType } from '../../context/APIWrapperContext'; interface DataGridDesktopProps { schema: SchemaType; dataGrid: { data: Item[]; }; setDataGrid: (value: React.SetStateAction<{ data: Item[]; }>) => void; rowCount?: number; columns: GridEnrichedBySchemaColDef[]; model: string; fieldKey?: string; labelKey?: string; index?: number; name?: string; indexField?: string; addExistingModel?: string; indexFieldMinWidth?: number; indexFieldBasePath?: string; indexFieldViewBasePath?: string; stateToLink?: object; minWidth?: number; loading?: boolean; modelParentId?: Id; modelParent?: string; customColumnOperations?: (p: GridEnrichedBySchemaColDef) => GridEnrichedBySchemaColDef | Promise<GridEnrichedBySchemaColDef>; customFieldFormLayouts?: Record<string, FormFieldLayout[]>; customLinkDestination?: (p: GridRenderCellParams) => string; LinkComponent?: LinkComponentType; onProcessRow?: (p: Item) => void; onDataChange?: (p: Item[]) => void; onEditModel?: (p: OnEditModelType) => void; isEditable?: boolean; hasBulkSelect?: boolean; onSelectActions?: OnSelectActions[]; sx?: SxProps; isAutoHeight?: boolean; defaultValues?: Item; hideFooterPagination?: boolean; setVisibleRows?: (p: GridRowId[]) => void; paginationModel?: PaginationModel; setPaginationModel?: (x: PaginationModel) => void; hideFooterComponent?: boolean; hideToolbarComponent?: boolean; tableAutoHeight?: boolean; actions?: Partial<ActionType>[]; customActions?: CustomAction[]; hideColumnsButton?: boolean; hideFilterButton?: boolean; hideDensityButton?: boolean; hideExportButton?: boolean; hideQuickFilterBar?: boolean; optionsAC?: OptionsAC; extraValidators?: Item; emptyItem: Item; handleDeleteClick: (id: Id) => () => void; setSnackBar: React.Dispatch<React.SetStateAction<Item>>; } declare const DataGridDesktop: React.ForwardRefExoticComponent<DataGridDesktopProps & React.RefAttributes<unknown>>; export default DataGridDesktop; //# sourceMappingURL=DataGridDesktop.d.ts.map