diff --git a/packages/x-data-grid-premium/src/hooks/utils/useGridApiRef.ts b/packages/x-data-grid-premium/src/hooks/utils/useGridApiRef.ts index 0ab61cb18d3e0..708fc36b459ed 100644 --- a/packages/x-data-grid-premium/src/hooks/utils/useGridApiRef.ts +++ b/packages/x-data-grid-premium/src/hooks/utils/useGridApiRef.ts @@ -1,4 +1,6 @@ -import { useGridApiRef as useCommunityGridApiRef } from '@mui/x-data-grid'; +import { RefObject } from '@mui/x-internals/types'; +import { GridApiCommon, useGridApiRef as useCommunityGridApiRef } from '@mui/x-data-grid'; import { GridApiPremium } from '../../models/gridApiPremium'; -export const useGridApiRef = useCommunityGridApiRef; +export const useGridApiRef: () => RefObject = + useCommunityGridApiRef; diff --git a/packages/x-data-grid-pro/src/hooks/utils/useGridApiRef.ts b/packages/x-data-grid-pro/src/hooks/utils/useGridApiRef.ts index 47d74e0b6a051..0828c9a98bddb 100644 --- a/packages/x-data-grid-pro/src/hooks/utils/useGridApiRef.ts +++ b/packages/x-data-grid-pro/src/hooks/utils/useGridApiRef.ts @@ -1,4 +1,6 @@ -import { useGridApiRef as useCommunityGridApiRef } from '@mui/x-data-grid'; +import { RefObject } from '@mui/x-internals/types'; +import { GridApiCommon, useGridApiRef as useCommunityGridApiRef } from '@mui/x-data-grid'; import { GridApiPro } from '../../models/gridApiPro'; -export const useGridApiRef = useCommunityGridApiRef; +export const useGridApiRef: () => RefObject = + useCommunityGridApiRef;