-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] Remove GridFormatterParams completely #12660
Conversation
Deploy preview: https://deploy-preview-12660--material-ui-x.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting use case for the inevitable BCs during the stable phase.
P.S. Could deprecation be used instead?
@@ -641,7 +641,7 @@ describe('<DataGridPremium /> - Aggregation', () => { | |||
it('should use the aggregation function valueFormatter if defined', () => { | |||
const customAggregationFunction: GridAggregationFunction = { | |||
apply: () => 'Agg value', | |||
valueFormatter: (params) => `+ ${params.value}`, | |||
valueFormatter: (value) => `+ ${value}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably document this in the migration guide and release notes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already in. This was missed during the refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failing argos SS could be fixed by:
diff --git a/docs/data/data-grid/aggregation/AggregationValueFormatter.tsx b/docs/data/data-grid/aggregation/AggregationValueFormatter.tsx
index 1a3f4c5a1..e5be77639 100644
--- a/docs/data/data-grid/aggregation/AggregationValueFormatter.tsx
+++ b/docs/data/data-grid/aggregation/AggregationValueFormatter.tsx
@@ -48,7 +48,7 @@ const firstAlphabeticalAggregation: GridAggregationFunction<string, string | nul
return sortedValue[0];
},
label: 'first alphabetical',
- valueFormatter: (params) => `Agg: ${params.value}`,
+ valueFormatter: (value) => `Agg: ${value}`,
columnTypes: ['string'],
};
Thanks! I overlooked this in #11573 |
Closes #12658
We didn't complete this breaking change. This is now a bug at runtime for users, so we need to remove it even if we didn't do it at v7 release.