generated from react-component/footer
-
Notifications
You must be signed in to change notification settings - Fork 26
[Bug report] 作为受控组件时,当初始值为 undefined 的时候不应该进行自动选择 #177
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
Comments
should be fixed in #176 |
Segmented 和 Radio 不太一样,更像是 Switch 没有未选状态(Switch 是要么是要么否,没有 undefined)。否则上来是空白的用户不知道这个组件怎么用。 |
是这个理儿,但受控组件的意思就是状态应当完全受用户控制,不应该在组件层面去做自动选择这种操作。
至少希望能提供一个选项,关闭自动选择。🥲
|
主要是不太好办
|
这个默认 UI 效果,用户很难知道这里是可点的,不建议这样用。 我建议你增加一个 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在以下示例中,初始化页面的时候会自动选择第一个选项:
这会导致一个问题:在 pro-component 的 ProFormSegmented 选项上,表单初始化的时候自动进行了视图层面的选择,但是没有触发 form instance 的数据更新,此时 segmented 组件的“是”选项无法再次被点击触发选择,form instance 的数据始终是 undefined
The text was updated successfully, but these errors were encountered: