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

How can I change the state of Switch Programatically? #18962

Closed
mdsadique2 opened this issue Sep 23, 2019 · 2 comments
Closed

How can I change the state of Switch Programatically? #18962

mdsadique2 opened this issue Sep 23, 2019 · 2 comments
Labels

Comments

@mdsadique2
Copy link

The issue which is not created via http://new-issue.ant.design will be closed immediately.

So I have a switch which when toggled, makes an API call. if call fails, I want to bring it back to its original state. How can I do that?

注意:不是用 http://new-issue.ant.design 创建的 issue 会被立即关闭。

@ant-design-bot
Copy link
Contributor

Hello @mdsadique2, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!

你好 @mdsadique2,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@keithort
Copy link

You are looking for the checked prop. Depending on your implementation will determine how you are setting that prop to true or false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants