Source: https://material.io/components/selection-controls/selection-controls.html#switches

I know, there're cases on where the "optimistic UI" approach would save you from having to show a progress indicator, but there're some cases where this is so much needed!
Please, consider adding this feature. I'd love to have a loading or processing prop perhaps…
Thanks for the proposal.
Hey @oliviertassinari,
I think it would be good to know why you're closing without any explanation.
If it's just "we don't have time/resources to do this" or also "but we're open for PRs" maybe?
Thanks
@nuragic, I have added the "upvotes" label to the issue, so we don't lose track of this proposal in the future. A few notes:
Thanks for clarifying! I agree that loading state on buttons is far more common, but it's also easier to solve it in userland with composition perhaps? I guess everyone do so... in the case of switch, well, it's not possible AFAICT.
About the question if this pattern is used in one of the products of Google or Apple, etc? I don't know, why this matters to you?
Regarding the time needed from maintainers: I know, reviewing and merging a PR is just the beginning... Many thanks to all of you who spend so much effort on material-ui! 💌
Fair, let's see if someone will show their 👍
About the question if this pattern is used in one of the products of Google or Apple, etc? I don't know, why this matters to you?
This is probably the most important aspect for us, it helps to answer the value part of the equation that makes us invest time on different topics (value/cost): "What's the amplitude of the pain point?".
Hi guys.
For anyone interested in this particular case I made this codesandbox:
https://codesandbox.io/s/switch-loading-state-vpinv
As @nuragic said, thanks to how the API has been built, we can use composition to achieve it.
I can put it as a demo in the switch demo page if you wish @oliviertassinari
Thanks! I think it would be great to add this example in the docs, yup!
Most helpful comment
Hi guys.
For anyone interested in this particular case I made this codesandbox:
https://codesandbox.io/s/switch-loading-state-vpinv
As @nuragic said, thanks to how the API has been built, we can use composition to achieve it.
I can put it as a demo in the switch demo page if you wish @oliviertassinari