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

[DataGrid] Extract getRowId API method as a selector #16487

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MBilalShafi
Copy link
Member

@MBilalShafi MBilalShafi commented Feb 6, 2025

Changelog

Fixes #16103

Fixes #16413

Better fix for #14691

Reuses the props state logic initially committed in #12343

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Tree data Related to the data grid Tree data feature feature: Row grouping Related to the data grid Row grouping feature feature: Aggregation Related to the data grid Aggregation feature feature: Row spanning Related to the data grid Row spanning feature needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels Feb 6, 2025
@@ -112,18 +113,11 @@ export const useGridRows = (
[apiRef],
);

const getRowIdProp = props.getRowId;
const getRowId = React.useCallback<GridRowApi['getRowId']>(
Copy link
Member Author

@MBilalShafi MBilalShafi Feb 6, 2025

Choose a reason for hiding this comment

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

Any thoughts about deprecating it in favor of the added utility?
Deprecated in favor of the new selector gridRowIdSelector
We could remove all internal instances later.

@mui-bot
Copy link

mui-bot commented Feb 6, 2025

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

Generated by 🚫 dangerJS against 8b0d8f6

@MBilalShafi MBilalShafi requested a review from a team February 6, 2025 11:43
@MBilalShafi MBilalShafi changed the title [DataGrid] Extract getRowId API method as static function [DataGrid] Extract getRowId API method as a selector Feb 6, 2025
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! feature: Aggregation Related to the data grid Aggregation feature feature: Row grouping Related to the data grid Row grouping feature feature: Row spanning Related to the data grid Row spanning feature feature: Tree data Related to the data grid Tree data feature needs cherry-pick The PR should be cherry-picked to master after merge v7.x
Projects
None yet
3 participants