public async void DeleteItem(Item itemToDelete) { // todo: sweet alert to confirm that cancellation is desired var result = await SweetAlertService.FireAsync(AlertHelper.ConfirmationWarning(string.Format("Are you sure you want to delete item {0}", itemToDelete.Name))); if (!string.IsNullOrEmpty(result.Value)) // ensures that deletion only occurs after confirmation { await ItemService.DeleteItem(itemToDelete); items = await ItemService.GetItems(); StateHasChanged(); } }