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

Toggle does not respond to UFormGroup Error state #423

Closed
ahoiroman opened this issue Jul 17, 2023 · 1 comment
Closed

Toggle does not respond to UFormGroup Error state #423

ahoiroman opened this issue Jul 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ahoiroman
Copy link

Version

@nuxthq/ui: 2.5.0
nuxt: 3.5.0

Reproduction Link

Steps to reproduce

Use a toggle like this:

<UFormGroup name="acceptTos" :error="!!errors.acceptTos">
    <UToggle v-model="acceptTos" name="acceptTos" />
</UFormGroup>

What is Expected?

If :error is true, the toggle should indicate this state like every other form field (Input, ...).

What is actually happening?

The toggle does not visually show the error state.

@ahoiroman ahoiroman added the bug Something isn't working label Jul 17, 2023
Copy link
Member

benjamincanac commented Jul 19, 2023

The issue here is that the red color for the Toggle hasn't been safelisted as there is no such code as <UToggle color="red" />.

In the latest commit, red color is always safelisted for all form elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants