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

Radio, RadioButton and RadioGroup should accept Boolean as value #3540

Closed
M1CK431 opened this issue Aug 17, 2022 · 3 comments · Fixed by #3541 or #3552
Closed

Radio, RadioButton and RadioGroup should accept Boolean as value #3540

M1CK431 opened this issue Aug 17, 2022 · 3 comments · Fixed by #3541 or #3552
Labels
feature request New feature or request

Comments

@M1CK431
Copy link
Contributor

M1CK431 commented Aug 17, 2022

This function solves the problem (这个功能解决的问题)

I would like to use Radio, RadioButton and RadioGroup to build a true/false switch (it looks better than the dedicated Switch component in my use case). Of course it's already working but raise a warning in browser console. In addition, I can't see any reason to forbid a Boolean as value here. What do you think?

Expected API (期望的 API)

No change is required at API, except that the existing value prop should just accept a Boolean in addition of String and Number.

@Sepush
Copy link
Collaborator

Sepush commented Aug 18, 2022

@equt 不需要 n-radio label 太多label 反而不清晰了

@equt equt removed the n-radio label Aug 18, 2022
@07akioni
Copy link
Collaborator

@equt 不需要 n-radio label 太多label 反而不清晰了

For component that has too many issues, I think we can add a tag. Currently I think the only one is data table.

cc @equt @Sepush

@M1CK431
Copy link
Contributor Author

M1CK431 commented Aug 20, 2022

It's soooo fast! 🚀 Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
4 participants