Skip to content

[data grid] Incorrect typing on @mui/x-data-grid-pro export GridRenderCellParams['api'], shows GridApiCommunity, should be GridApiPro #15963

@eric-blue

Description

@eric-blue

Steps to reproduce

Steps:

  1. https://stackblitz.com/edit/github-wyzzjdzp?file=src%2Fdemo.tsx
  2. go here
    export type GridApi = GridApiPro;
    and see that GridApiPro is exported
  3. which is not what is coming from here
    export * from '@mui/x-data-grid/models';

Current behavior

community typing for GridApi being surfaced in x-data-grid-pro

Expected behavior

GridApiPro being present in pro export for GridRenderCellParams (example: GridRenderCellParams['api']['getExpandedDetailPanels'])

Context

proper typing

Your environment

npx @mui/envinfo
  System:
    OS: macOS 15.2
  Binaries:
    Node: 22.9.0 - /opt/homebrew/bin/node
    npm: 10.8.3 - /opt/homebrew/bin/npm
    pnpm: 9.6.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.205
    Edge: Not Found
    Safari: 18.2
  npmPackages:
    @emotion/react: 11.14.0 => 11.14.0 
    @emotion/styled: 11.14.0 => 11.14.0 
    @mui/base:  5.0.0-beta.66 
    @mui/core-downloads-tracker:  6.2.0 
    @mui/icons-material: 6.2.0 => 6.2.0 
    @mui/lab: 6.0.0-beta.19 => 6.0.0-beta.19 
    @mui/material: 6.2.0 => 6.2.0 
    @mui/private-theming:  6.2.0 
    @mui/styled-engine:  6.2.0 
    @mui/system:  6.2.0 
    @mui/types:  7.2.19 
    @mui/utils:  6.1.4 
    @mui/x-charts: 7.23.2 => 7.23.2 
    @mui/x-charts-vendor:  7.20.0 
    @mui/x-data-grid:  7.23.2 
    @mui/x-data-grid-pro: 7.23.2 => 7.23.2 
    @mui/x-date-pickers:  7.23.2 
    @mui/x-date-pickers-pro: 7.23.2 => 7.23.2 
    @mui/x-internals:  7.23.0 
    @mui/x-license: 7.23.2 => 7.23.2 
    @types/react: 18.3.11 => 18.3.11 
    react: 18.3.1 => 18.3.1 
    react-dom: 18.3.1 => 18.3.1 
    typescript: 5.6.2 => 5.6.2 

Search keywords: GridApiPro, GridRenderCellParams, @mui/x-data-grid-pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: data gridChanges related to the data grid.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions