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] Premium component relies on slotProps type from pro version #15664

Open
giavinh79 opened this issue Nov 28, 2024 · 1 comment
Open
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! typescript

Comments

@giavinh79
Copy link

giavinh79 commented Nov 28, 2024

Steps to reproduce

Steps:

  1. https://codesandbox.io/p/sandbox/test-sandbox-slotprops-kwv9dw

Current behavior

Hover over the DataGridPremium prop slotProps in the sandbox above, can see that the type is GridProSlotProps through intellisense.

Expected behavior

DataGridPremium should export its own type for slotProps from @mui/x-data-grid-premium so we don't need to have @mui/x-data-grid-pro installed to leverage that type explicitly

Context

No response

Your environment

  System:
    OS: macOS 14.7.1
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 131.0.6778.86
    Edge: 131.0.2903.70
    Safari: 17.6
  npmPackages:
    @types/react: ^18.3.3 => 18.3.3 
    react: ^18.3.1 => 18.3.1 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: 5.4.5 => 5.4.5 

Search keywords: DataGrid premium slotProps type
Order ID: Order ID is 76942

@giavinh79 giavinh79 added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 28, 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 Nov 28, 2024
@michelengelen
Copy link
Member

Thanks @giavinh79 for opening this.
Makes total sense that this is the incorrect type.

I'll add this to the board for us to fix! 👍🏼

@michelengelen michelengelen added typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 29, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Nov 29, 2024
@michelengelen michelengelen changed the title [DataGrid] Premium component relies on slotProps type from pro version [data grid] Premium component relies on slotProps type from pro version Nov 29, 2024
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! typescript
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

2 participants