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

useComputedColorScheme with getInitialValueInEffect: true won't work #5549

Closed
2 tasks done
Songkeys opened this issue Jan 12, 2024 · 2 comments
Closed
2 tasks done

useComputedColorScheme with getInitialValueInEffect: true won't work #5549

Songkeys opened this issue Jan 12, 2024 · 2 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@Songkeys
Copy link
Contributor

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.4.1

What package has an issue?

@mantine/core

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

All

Describe the bug

because the config is not passed into the useMantineColorScheme hook:

const osColorScheme = useColorScheme('light', { getInitialValueInEffect: false });

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

Pass the configuration down to make it take effect?

Self-service

  • I would be willing to implement a fix for this issue
rtivital added a commit that referenced this issue Jan 17, 2024
…orking correctly when initial value is provided (#5575, #5549)
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Jan 17, 2024
@rtivital
Copy link
Member

Fixed in 7.4.2

@Songkeys
Copy link
Contributor Author

I don't think this fixed the issue? When the colorScheme is auto, it'll always fall into the getInitialValueInEffect: false call inside the use-mantine-color-scheme hook. Please see my pasted code link ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants