我在官方文档中看到的switch组件只能通过“rc-form”,去控制switch的状态,无法通过通常的 value<==>onChange() 进行数据绑定。我的业务场景是切换状态时会有一个弹窗提示再进行切换,以官网的例子似乎无法做到这一点。非常感谢您的解答
期望的switch组件使用方式:
<Switch
value={checked}
onChange={checked => {
this.setState({checked})
}}
/>
It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: https://github.com/ant-design/ant-design/issues/4897