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

[charts] Fix TS bottle neck #13137

Merged
merged 2 commits into from
May 15, 2024
Merged

[charts] Fix TS bottle neck #13137

merged 2 commits into from
May 15, 2024

Conversation

alexfauquette
Copy link
Member

Fix #12921

The issue seems to come from the useSlotProps which try to guess props types from the component Bar

Wich can be a styled(animated.rect) or a rect component with some additional props.

To simplify all that:

  • I updated BarProps such that it knows it needs to expect props x, y, width, and height to be animated ones
  • Override the type of BarElementPath such that styles only get access the the BarProps`

@alexfauquette alexfauquette added typescript component: charts This is the name of the generic UI component, not the React module! labels May 15, 2024
@mui-bot
Copy link

mui-bot commented May 15, 2024

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

Generated by 🚫 dangerJS against e15d286

Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

👌 Very nice improvement

@alexfauquette alexfauquette merged commit 6c4308f into mui:master May 15, 2024
18 of 19 checks passed
arthurbalduini pushed a commit to arthurbalduini/mui-x that referenced this pull request May 23, 2024
joakimtveter pushed a commit to joakimtveter/mui-x that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[charts] Fix TS performances
3 participants