drf-react-by-schema
Version:
Components and Tools for building a React App having Django Rest Framework (DRF) as server
59 lines • 2.39 kB
TypeScript
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, MobileListRenderItemType } from '../@types';
import { OnEditModelType } from '../context/APIWrapperContext';
interface DataGridBySchemaEditableProps {
schema: SchemaType;
data: Item[];
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;
MobileListRenderItem?: MobileListRenderItemType;
}
declare const DataGridBySchemaEditable: React.ForwardRefExoticComponent<DataGridBySchemaEditableProps & React.RefAttributes<unknown>>;
export default DataGridBySchemaEditable;
//# sourceMappingURL=DataGridBySchemaEditable.d.ts.map