EdCharbeneau / BlazorPro.Spinkit

A Blazor library for loading and long process scenarios based on the CSS library Spinkit
99 stars 22 forks source link

There are no cancel option for method calls below spinner? #5

Closed dmlgncn closed 4 years ago

dmlgncn commented 4 years ago

Hi, There is no cancellation option, is not it? Implementing cancel button will be possible next releases?

EdCharbeneau commented 4 years ago

Sorry for the late reply. I didn't receive a notification of the issue.

I don't feel that a cancel API is part of the scope of the project. Cancellation is something that is part of the service layer of the application. How the developer integrates that with their UI is entirely up to them. This would require additional components, like a cancel button for example. For something like this I would suggest using the spinner directly and wrapping it in a custom component that incorporates how cancellation is handled by your application.

Additional reading: https://medium.com/@cilliemalan/how-to-await-a-cancellation-token-in-c-cbfc88f28fa2