drf-react-by-schema
Version:
Components and Tools for building a React App having Django Rest Framework (DRF) as server
61 lines • 2.6 kB
TypeScript
import React, { ReactElement } from 'react';
import { GridRowId, GridRenderCellParams, GridColumnVisibilityModel } from '@mui/x-data-grid';
import { SxProps, Theme } from '@mui/material/styles';
import { Item, SchemaType, Id, GridEnrichedBySchemaColDef, PaginationModel, ActionType, OnSelectActions, OptionsAC, FormFieldLayout, CustomAction, LinkComponentType, MobileListRenderItemType, ExtraValidators } from '../@types';
import { OnEditModelType } from '../context/APIWrapperContext';
interface DataGridBySchemaEditableProps {
schema: SchemaType;
data: Item[];
rowCount?: number;
columns: GridEnrichedBySchemaColDef[];
columnVisibilityModel?: GridColumnVisibilityModel;
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<Theme>;
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?: ExtraValidators;
MobileListRenderItem?: MobileListRenderItemType;
MobileRenderNoResults?: () => ReactElement | null;
}
declare const DataGridBySchemaEditable: React.ForwardRefExoticComponent<DataGridBySchemaEditableProps & React.RefAttributes<unknown>>;
export default DataGridBySchemaEditable;
//# sourceMappingURL=DataGridBySchemaEditable.d.ts.map