27 lines
567 B
Plaintext
27 lines
567 B
Plaintext
<h3>Test</h3>
|
|
|
|
<button type="button" @onclick="@PlaceOrder_Clicked" disabled="@DisablePlaceOrderButton">@Title</button>
|
|
|
|
@code{
|
|
private bool DisablePlaceOrderButton { get; set; } = false;
|
|
|
|
public string Title { get; set; } = "Place Order";
|
|
|
|
private async Task PlaceOrder_Clicked()
|
|
{
|
|
|
|
await DisablePlaceOrder();
|
|
|
|
DisablePlaceOrderButton = false;
|
|
Title = "Place Order";
|
|
|
|
}
|
|
|
|
async Task DisablePlaceOrder()
|
|
{
|
|
DisablePlaceOrderButton = true;
|
|
Title = "Wait...";
|
|
await Task.Delay(1000);
|
|
|
|
}
|
|
} |