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

docs(Theme): theme.global.name/current shouldn't have .value #19588

Merged
merged 1 commit into from Apr 11, 2024

Conversation

crazyrabbit0
Copy link
Contributor

Description

Removed .value from theme.global.name and theme.global.current,
because it broke the function toggleTheme.

`toggleTheme` fix:  `.value`  should not be there
@crazyrabbit0 crazyrabbit0 changed the title fix(Theme): theme.global.name/current shouldn't have .value docs(Theme): theme.global.name/current shouldn't have .value Apr 10, 2024
@johnleider johnleider merged commit 83bb5b4 into vuetifyjs:master Apr 11, 2024
10 checks passed
@johnleider johnleider added this to the v3.5.x milestone Apr 11, 2024
@crazyrabbit0 crazyrabbit0 deleted the patch-1 branch April 11, 2024 05:58
@carvenl
Copy link

carvenl commented May 3, 2024

After my testing, theme.global.name = theme.global.current.dark ? 'light' : 'dark' is ineffective, while theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark' is functional.

@alihardan
Copy link

@johnleider, I believe this PR should reverted. the .value is necessary here (I have tested), because the example in docs written in Composition API and we interact with refs here.

@crazyrabbit0
Copy link
Contributor Author

Interesting, so .value is needed when in Composition API, but not in Options API ? 🤔

@alihardan
Copy link

Interesting, so .value is needed when in Composition API, but not in Options API ? 🤔

Yes, you have to write .value when accessing to ref reactive state only when you are in script setup.

@crazyrabbit0
Copy link
Contributor Author

That's new, good to know! 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants