on click/press of a toggle i want to make an api call and only if it succeeds have the toggle change state, i can only seem to get javascript events to execute for the value change event and that is too late as the toggle has moved. any ideas?
on click/press of a toggle i want to make an api call and only if it succeeds have the toggle change state, i can only seem to get javascript events to execute for the value change event and that is too late as the toggle has moved. any ideas?
Hello Conor,
Unfortunately, you can prevent this event. You can make toggle component disable track click event, call your service and then make it enable on success event from service change toggle state.