-
-
Notifications
You must be signed in to change notification settings - Fork 49.7k
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
Checkbox.Group 和 Radio.Group 的 disabled 机制不一样,应该 group 的 disabled 禁用优先级更高,checkbox 是错的 #7266
Comments
It will be better to write your issue/comment in English, so more people can understand you. |
按我的理解,应该是 Checkbox 的才是对的,就像 CSS 样式那样,直接加到元素本身的样式,优先级在继承过来的之上。 |
@reoszo 来个 PR? |
你按照的是研发的代码角度看的,要是考虑使用上来说,组都disable了,单项还能用? |
从任何角度来说 Checkbox 的属性优先都是更合理的。RadioGroup 的实现有问题。 |
你确定?业务中使用人员的情况了解一下吧 |
要是Checkbox是对的,我就不pr了,我自己改我们的Checkbox了,[哭笑] |
不急,我先找找其他 UI 库的做法。 |
吼 |
就一行代码啊,你们顺手改了吧,呵呵 |
贡献一下,后面说不定还有 bug。 |
好,我试一把先 |
Thx! @dilidili |
Version
2.12.6
Environment
all
Reproduction link
https://codepen.io/benjycui/pen/KgPZrE?editors=001
Steps to reproduce
Radio 源码:radioProps.disabled = props.disabled || radioGroup.disabled;
Checkbox 源码:checkboxProps.disabled = 'disabled' in props ? props.disabled : checkboxGroup.disabled;
What is expected?
Checkbox.Group disable 时,所有 Checkbox disable。
What is actually happening?
Checkbox 根据自己的 disabled 属性显示禁用状态
The text was updated successfully, but these errors were encountered: