@mui/x-data-grid
Version:
The Community plan edition of the MUI X Data Grid components.
25 lines • 906 B
TypeScript
import type { RefObject } from '@mui/x-internals/types';
import type { GridControlledStateReasonLookup } from "../events/gridEventLookup.js";
import type { GridApiCommon } from "./gridApiCommon.js";
/**
* Additional details passed to the callbacks
*/
export interface GridCallbackDetails<K extends keyof GridControlledStateReasonLookup = any, Api extends GridApiCommon = GridApiCommon> {
/**
* The reason for this callback to have been called.
*/
reason?: GridControlledStateReasonLookup[K];
/**
* GridApi that let you manipulate the grid.
*/
api: GridApiCommon;
/**
* A ref to the GridApi that let you manipulate the grid.
* Can be used to call selectors without a separate `useGridApiRef`.
* @example
* onRowSelectionModelChange={(model, details) => {
* const rows = gridRowSelectionIdsSelector(details.apiRef);
* }}
*/
apiRef: Readonly<RefObject<Api>>;
}