diff --git a/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts b/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts index 0d50f1b0a819..b1efe92d1480 100644 --- a/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts +++ b/packages/x-data-grid-premium/src/DataGridPremium/useDataGridPremiumProps.ts @@ -4,6 +4,7 @@ import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT, DataGridProProps, + GridSignature, } from '@mui/x-data-grid-pro'; import { computeSlots, useProps } from '@mui/x-data-grid-pro/internals'; import { @@ -25,7 +26,7 @@ type GetDataGridProForcedProps = ( ) => DataGridProForcedProps; const getDataGridPremiumForcedProps: GetDataGridProForcedProps = (themedProps) => ({ - signature: 'DataGridPremium', + signature: GridSignature.DataGridPremium, ...(themedProps.unstable_dataSource ? { filterMode: 'server', diff --git a/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts b/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts index 61f639fb183a..3113bc997010 100644 --- a/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts +++ b/packages/x-data-grid/src/hooks/core/useGridApiInitialization.ts @@ -120,7 +120,8 @@ export function useGridApiInitialization< } const details = - props.signature === GridSignature.DataGridPro + props.signature === GridSignature.DataGridPro || + props.signature === GridSignature.DataGridPremium ? { api: privateApiRef.current.getPublicApi() } : {}; privateApiRef.current.eventManager.emit(name, params, event, details); diff --git a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts index 2e75893309e9..b35036c795bf 100644 --- a/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts +++ b/packages/x-data-grid/src/hooks/utils/useGridApiEventHandler.ts @@ -13,6 +13,7 @@ import type { GridApiCommon } from '../../models'; enum GridSignature { DataGrid = 'DataGrid', DataGridPro = 'DataGridPro', + DataGridPremium = 'DataGridPremium', } interface RegistryContainer {