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

next: Select "required" doesn't apply :invalid state #1021

Open
EskelCz opened this issue Dec 29, 2024 · 0 comments
Open

next: Select "required" doesn't apply :invalid state #1021

EskelCz opened this issue Dec 29, 2024 · 0 comments
Labels
1.x Issues that will be addressed in 1.x of Bits UI enhancement An improvement to an existing feature/component
Milestone

Comments

@EskelCz
Copy link

EskelCz commented Dec 29, 2024

Describe the bug

When required is set to true on @next version of Select component, it doesn't apply the :invalid state (or any other class that I can see) that could be used to style the trigger element. The invalid state should be applied right away when the value isn't one of the items. Maybe I'm missing something.
I would also suggest a :user-invalid state that is set after an interaction with the form.
Thanks for your consideration.

Reproduction

https://stackblitz.com/edit/vitejs-vite-j8dpdx6g?file=src%2FApp.svelte

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1
    Memory: 460.33 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
    npm: 11.0.0 - ~/.nvm/versions/node/v20.18.0/bin/npm
  Browsers:
    Chrome: 131.0.6778.205
    Safari: 17.6
  npmPackages:
    @sveltejs/kit: ^2.10.1 => 2.11.1 
    bits-ui: next => 1.0.0-next.74 
    svelte: ^5.12.0 => 5.12.0

Severity

blocking an upgrade

@huntabyte huntabyte added this to the 1.x milestone Dec 31, 2024
@huntabyte huntabyte added enhancement An improvement to an existing feature/component 1.x Issues that will be addressed in 1.x of Bits UI labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Issues that will be addressed in 1.x of Bits UI enhancement An improvement to an existing feature/component
Projects
None yet
Development

No branches or pull requests

2 participants