Forum Academy Marketplace Showcase Pricing Features

How to revert IonicToggle state programmatically?

Hi,

How to revert the toggle button programmatically? Let’s say the user toggle off the button and that triggers a popup to open. From the popup, the user clicks on nevermind. I would like to revert the state. How to achieve that?

Thanks

image

It depends whether you have assigned the Toggle to a Thing in the database or should it just be a variable which only ‘lives’ on the page?

I tried both (assigned to a thing and assigned to a state parameter on the page), both does not work.

I can’t revert the switcher (toggle button) by changing the state parameter.

1 Like

Thanks @thomas6, I will give a try.

It works. Not sure why I did not think about the reset group.

1 Like