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

[BUG] - Property isRequired does not exist on Switch component #1610

Closed
st1ng7ay opened this issue Sep 12, 2023 · 4 comments
Closed

[BUG] - Property isRequired does not exist on Switch component #1610

st1ng7ay opened this issue Sep 12, 2023 · 4 comments
Labels
🐛 Type: Bug Something isn't working

Comments

@st1ng7ay
Copy link

NextUI Version

2.1.12

Describe the bug

Property isRequired does not exist on Switch component

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

add isRequired property to Switch component

Expected behavior

Switch have isRequired property

Screenshots or Videos

image

Operating System Version

MacOS Ventura

Browser

Chrome

@st1ng7ay st1ng7ay added the 🐛 Type: Bug Something isn't working label Sep 12, 2023
@Digoler
Copy link

Digoler commented Sep 14, 2023

I don't see this attribute in the source code

@jrgarciadev
Copy link
Member

Hey @st1ng7ay the Switch component is not meant to be required by concept, however, you can apply your own validations using the controlled way https://nextui.org/docs/components/switch#controlled

We adhere to react-aria implementation which doesn't have "isRequired" support, therefore I'm going to close this issue

@st1ng7ay
Copy link
Author

there are isRequired prop in switch props docs :

https://nextui.org/docs/components/switch#switch-props

@Glavin001
Copy link

A couple members on my team ran into this bug as well. Docs are still not up-to-date.

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

No branches or pull requests

4 participants