-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
switch support onClick #1290
Comments
when switch's prop disabled be true,onClick also can be triggered. |
may be need support readonly. |
除了实现上做限制外,propsType上可以考虑加上
|
@pingan1927 这个需求背景是什么?Switch 为什么需要 onClick, 有 onChange 不就足够了么? |
同样不明白,为什么需要 onClick,另外 readonly 不就是受控模式么? |
当switch disabled时,用户点击switch时需要提示用户去做其它操作。disabled时无法触发onChange事件。 |
readeOnly慢慢再考虑,react组件不需要完全跟web标准一样。 |
@pingan1927 这个需求,业务在Switch外面再包一个div也能实现吧 |
lixiaoyang1992
pushed a commit
to lixiaoyang1992/ant-design-mobile
that referenced
this issue
Apr 26, 2018
* fix ant-design#1290 * update * fix bug * fix * update API doc * update switch PropsType
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
need onClick
What does the proposed API look like?
onClick
The text was updated successfully, but these errors were encountered: