-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
typesafe context modals - MantineModalsOverride doesnt work #4341
Comments
PR: #4343 |
rtivital
added
the
TBD
It is clear how to fix the issue and the fix will be provided soon
label
Sep 25, 2023
rtivital
removed
the
TBD
It is clear how to fix the issue and the fix will be provided soon
label
Jul 2, 2024
Fixed in #6443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What package has an issue
@mantine/modals
Describe the bug
I am trying to let typescript hint me names of context modals, as listed in this chapter.
By providing modals override through MantineModalsOverride interface, i successfully extend modals by "testOverride", as shown in picture below:
But even though i extend it, MantineModal type still extracts only "string" value, as shown here:
I think wanted behaviour is as follows:
Do you have an idea on how to solve this? Or am i doing something wrong?
What version of @mantine/hooks page do you have in package.json?
6.0.10
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/musing-lehmann-wbj8lp?file=/src/App.tsx
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
Don't check whether overrides structure has modals property, just let user override it as he would like. Typically if someone changes d.ts files, he usually knows what he's doing
The text was updated successfully, but these errors were encountered: