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] GridAggregationParams is not exported from the library #12805

Closed
genepaul opened this issue Apr 16, 2024 · 3 comments
Closed

[data grid] GridAggregationParams is not exported from the library #12805

genepaul opened this issue Apr 16, 2024 · 3 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature good first issue Great for first contributions. Enable to learn the contribution process. typescript

Comments

@genepaul
Copy link
Contributor

genepaul commented Apr 16, 2024

This is a TypeScript issue. It makes writing custom aggregation functions difficult.

Search keywords:
GridAggregationParams, aggregation functions

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 16, 2024
@michelengelen michelengelen changed the title GridAggregationParams is not exported from the library [data grid] GridAggregationParams is not exported from the library Apr 17, 2024
@michelengelen
Copy link
Member

Hey @genepaul I guess this is unintentional.

Here is a diff for this fix:

diff --git a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts
index 03be19423..bbbc50168 100644
--- a/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts
+++ b/packages/x-data-grid-premium/src/hooks/features/aggregation/gridAggregationInterfaces.ts
@@ -82,7 +82,7 @@ export interface GridAggregationFunction<V = any, AV = V, FAV = AV> {
   getCellValue?: (params: GridAggregationGetCellValueParams) => V;
 }

-interface GridAggregationParams<V = any> {
+export interface GridAggregationParams<V = any> {
   values: (V | undefined)[];
   groupId: GridRowId;
   field: GridColDef['field'];

Feel free to pick it up if you like.
I will add this to the board for the team.

@michelengelen michelengelen added component: data grid This is the name of the generic UI component, not the React module! typescript good first issue Great for first contributions. Enable to learn the contribution process. enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 17, 2024
@genepaul
Copy link
Contributor Author

This appears to be complete. Thanks!

Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@genepaul: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature good first issue Great for first contributions. Enable to learn the contribution process. typescript
Projects
Status: Done
Development

No branches or pull requests

2 participants