UNPKG

drf-react-by-schema

Version:

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

33 lines 1.54 kB
import { AnySchema } from 'yup'; import { GridRowId } from '@mui/x-data-grid'; import { Item, SchemaType, Id, ExtraValidators, OnEditModelType, GridEnrichedBySchemaColDef } from '../../../@types'; interface UseProcessRowUpdateProps { preparedColumns: GridEnrichedBySchemaColDef[] | null; yupValidationSchema: AnySchema | null; setDataGridLoading: (value: boolean) => void; indexField: string; processingRow: React.RefObject<number | string | null>; setValidationErrors: React.Dispatch<React.SetStateAction<Record<GridRowId, Record<string, string>>>>; modelParent?: string; modelParentId?: Id; model: string; schema: SchemaType; addExistingModel?: string; updateOptionsAC: () => Promise<void>; dataGrid: { data: Item[]; }; setDataGrid: (value: React.SetStateAction<{ data: Item[]; }>) => void; onDataChange?: (p: Item[]) => void; onProcessRow?: (p: Item) => void; handleStopEditing: () => void; extraValidators?: ExtraValidators; onEditModel?: (p: OnEditModelType) => void; } export declare const useProcessRowUpdate: ({ preparedColumns, yupValidationSchema, setDataGridLoading, indexField, processingRow, setValidationErrors, modelParent, modelParentId, model, schema, addExistingModel, updateOptionsAC, dataGrid, setDataGrid, onDataChange, onProcessRow, handleStopEditing, onEditModel, }: UseProcessRowUpdateProps) => { processRowUpdate: (editedRow: Item) => Promise<any>; }; export {}; //# sourceMappingURL=useProcessRowUpdate.d.ts.map