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

[@mantine/core] Fix types for components that forward ref #2505

Merged
merged 3 commits into from Sep 24, 2022

Conversation

Stouffi
Copy link
Contributor

@Stouffi Stouffi commented Sep 20, 2022

closes #2504

This PR refactors the utility type ForwardRefWithStaticComponents defined in src/mantine-utils/src/ForwardRefWithStaticComponents.ts in order to build a final type which match what forwardRef returns plus the static properties we want to expose.

Changing ForwardRefWithStaticComponents has helped to find that at least 15 components were affected with missing ref attribute in their type

Note that prettier had to be updated due to this issue prettier/prettier#12640

@rtivital rtivital merged commit 3efdd88 into mantinedev:master Sep 24, 2022
@rtivital
Copy link
Member

Thanks!

rtivital added a commit that referenced this pull request Sep 24, 2022
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.

@mantine/core some components cannot be given ref due to wrong typings
2 participants