Skip to content

[data grid] Add Api type param to cell params model#15968

Closed
k-rajat19 wants to merge 4 commits intomui:masterfrom
k-rajat19:grid-api-type
Closed

[data grid] Add Api type param to cell params model#15968
k-rajat19 wants to merge 4 commits intomui:masterfrom
k-rajat19:grid-api-type

Conversation

@k-rajat19
Copy link
Contributor

@k-rajat19 k-rajat19 commented Dec 21, 2024

Closes #15963
Closes #12148

@k-rajat19 k-rajat19 changed the title [data grid] Add Api type param to cell params interfaces [data grid] Add Api type param to cell params model Dec 21, 2024
@mui-bot
Copy link

mui-bot commented Dec 21, 2024

Deploy preview: https://deploy-preview-15968--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 8f0baa6

@k-rajat19
Copy link
Contributor Author

k-rajat19 commented Dec 27, 2024

@michelengelen, could you review this?
Side Note: I'm not reexporting these types for pro and premium packages separately, one can pass pro and premium grid API in Api type param easily.

Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I would like a second review from @arminmeh about this.

@zannager zannager added the scope: data grid Changes related to the data grid. label Dec 30, 2024
@arminmeh
Copy link
Contributor

arminmeh commented Jan 3, 2025

Side Note: I'm not reexporting these types for pro and premium packages separately, one can pass pro and premium grid API in Api type param easily.

Is this expected from the users?

Looking backwards, I think that we shouldn't have done this
#14201 (related issue #14190)

This made api public API

We are not accessing api in any of our examples. People can use internal API, but that does not mean that we have to make it public.

@mui/xgrid should we remove api from the public API in v8 and just patch v7 to support proper types?

@cherniavskii
Copy link
Member

This made api public API
We are not accessing api in any of our examples. People can use internal API, but that does not mean that we have to make it public.

Not sure what you mean here. api in this case is the same as apiRef.current, isn't it?

@arminmeh
Copy link
Contributor

arminmeh commented Jan 6, 2025

api in this case is the same as apiRef.current, isn't it

true, but we added another public point of accessing it.
I didn't deep dive into the initial issue where it was requested to document this, but I feel that we didn't had to.
Then we would also not have this "problem". And the proposed solution is that the developers still have to do some additional work, so it is just creating unnecessary complexity IMO

@arminmeh
Copy link
Contributor

arminmeh commented Jan 6, 2025

api was attached to the cell params because of https://github.com/mui/mui-x/blob/v7.23.5/packages/x-data-grid/src/components/cell/GridCell.tsx#L196
I don't think it was meant to be documented and part of the public API

@romgrk
Copy link
Contributor

romgrk commented Jan 6, 2025

I think we should be removing api from the public API. We also expose our API as api is other places, that we should also remove.

@github-actions
Copy link
Contributor

This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days.

@github-actions github-actions bot added the stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. label Mar 25, 2025
@github-actions github-actions bot removed the stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. label May 14, 2025
@arminmeh arminmeh added typescript needs cherry-pick The PR should be cherry-picked to master after merge. v7.x labels May 14, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 14, 2025

Thanks for adding a type label to the PR! 👍

@github-actions
Copy link
Contributor

Please add one type label to categorize the purpose of this PR appropriately:

bug, regression, enhancement, new feature, release or dependencies

@arminmeh arminmeh added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label May 14, 2025
Copy link
Contributor

@arminmeh arminmeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side Note: I'm not reexporting these types for pro and premium packages separately, one can pass pro and premium grid API in Api type param easily.

This creates a burden for the developers and I think that needs to be addressed before merging

@github-actions
Copy link
Contributor

This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days.

@github-actions github-actions bot added the stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. label Jun 14, 2025
@github-actions
Copy link
Contributor

This pull request has been closed due to 15 days of inactivity after being marked stale.

@github-actions github-actions bot closed this Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs cherry-pick The PR should be cherry-picked to master after merge. scope: data grid Changes related to the data grid. stale Inactive for 7 days (issues) or 30 days (PRs); closed after 5 or 15 more days if no update. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. typescript v7.x

Projects

None yet

7 participants