UNPKG

@mui/x-data-grid

Version:

The Community plan edition of the Data Grid components (MUI X).

18 lines (17 loc) 1.13 kB
import { RefObject } from '@mui/x-internals/types'; import { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare'; import type { GridApiCommon } from '../../models/api/gridApiCommon'; import type { OutputSelector, OutputSelectorV8 } from '../../utils/createSelector'; type Selector<Api extends GridApiCommon, Args, T> = ((state: Api['state']) => T) | OutputSelectorV8<Api['state'], Args, T>; export declare const objectShallowCompare: typeof fastObjectShallowCompare; export declare const argsEqual: (prev: any, curr: any) => boolean; type Refs<T> = { state: T; equals: <U = T>(a: U, b: U) => boolean; selector: Selector<any, any, T>; args: any; subscription: undefined | (() => void); }; export declare const useGridSelector: <Api extends GridApiCommon, T>(apiRef: RefObject<Api>, selector: ((state: Api["state"]) => T) | OutputSelector<Api["state"], T>, equals?: (a: T, b: T) => boolean) => T; export declare const useGridSelectorV8: <Api extends GridApiCommon, Args, T>(apiRef: RefObject<Api>, selector: Selector<Api, Args, T>, args?: Args, equals?: Refs<T>["equals"]) => T; export {};