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

fix(useDataGrid): overide DataGridPropsType onFilterModelChange #6151

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

Sergio16T
Copy link
Contributor

@Sergio16T Sergio16T commented Jul 17, 2024

Bugs / Features

What is the current behavior?

Current DataGridPropsType implicitly inherits type onFilterModelChange?: (model: GridFilterModel, details: GridCallbackDetails<'filter'>) => void;

This is incompatible with redefine useDataGrid implementation which has not implemented the details argument logic in handleFilterModelChange. This causes TS errors when upgrading to @mui/x-data-grid-pro": "7.5.1"

What is the new behavior?

Now useDataGrid's DataGridPropsType has been overridden to explicitly define onFilterModelChange to match handleFilterModelChange.

fixes #5997

@Sergio16T Sergio16T requested a review from a team as a code owner July 17, 2024 19:27
Copy link

changeset-bot bot commented Jul 17, 2024

🦋 Changeset detected

Latest commit: de4cea0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/mui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@aliemir aliemir left a comment

Choose a reason for hiding this comment

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

Hey @Sergio16T, thank you for the contribution! I've reviewed the changes and also tested on my local by using @mui/[email protected] and it worked as expected 👏👏

This change will be included in our next release, thanks again for your effort. 🚀

@aliemir aliemir added this to the August Release milestone Jul 18, 2024
@BatuhanW BatuhanW changed the base branch from master to releases/august July 18, 2024 12:05
@BatuhanW BatuhanW merged commit 4b84270 into refinedev:releases/august Jul 18, 2024
14 checks passed
@BatuhanW BatuhanW mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MUI useDataGrid's dataGridProps type not compatible with DataGridPro
3 participants