Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eric-blue opened this issue Dec 20, 2024 · 3 comments · May be fixed by #15968
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@eric-blue
Copy link

eric-blue commented Dec 20, 2024

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

@eric-blue eric-blue added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 20, 2024
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Dec 20, 2024
@eric-blue
Copy link
Author

quicker reference:
Screenshot 2024-12-20 at 11 49 10 AM

@k-rajat19 k-rajat19 linked a pull request Dec 21, 2024 that will close this issue
1 task
@michelengelen
Copy link
Member

Thanks for taking quick action @k-rajat19

Fixing this might also fix #12148 ... Could you check if it does?

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Dec 23, 2024
@michelengelen michelengelen changed the title Incorrect typing on @mui/x-data-grid-pro export GridRenderCellParams['api'], shows GridApiCommunity, should be GridApiPro [data grid] Incorrect typing on @mui/x-data-grid-pro export GridRenderCellParams['api'], shows GridApiCommunity, should be GridApiPro Dec 23, 2024
@k-rajat19
Copy link
Contributor

Fixing this might also fix #12148 ... Could you check if it does?

Hi @michelengelen , it doesn't fix that, I'll update the PR to address that issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
Status: 🆕 Needs refinement
Development

Successfully merging a pull request may close this issue.

3 participants