-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
I would like to ask if you could add parameter bool Busy to make loading state easy to manage through Task started/finished.
[Parameter]
public bool Busy { get; set; } = false;
@if (LoadingState != LoadingState.None && Busy == true)
{
<div class="@(LoadingState.GetDescription<StyleAttribute>())">
<i class="@LoadingStateIcon @(LoadingStateIconSpinning ? "fa-spin" : "")"></i>
</div>
}
Than is easy to manage state
<SmallBox Icon="fas fa-shopping-cart" BackgroundColor="Color.Info" LoadingState="LoadingState.Dark" Busy="IsBusy">
private bool IsBusy { get; set; } = false;
async Task Busy()
{
IsBusy = true;
//Whatever you want Task to do
await Task.CompletedTask;
IsBusy = false;
}
Same applies for cards.
I did it for myself but to help others as well. Also I changed Contet project fontawesome from 5.13.0 to 6.2.0. If you have no time I am going to be happy to send you nuget packages to upload them.
Metadata
Metadata
Assignees
Labels
No labels