private async Task OnDeleteVideoConfirmedAsync() { var deleteTask = OnDelete.InvokeAsync(this.VideoModel); this.ShowDeleteConfirm = false; await deleteTask; }
private async Task DeleteCustomer() { _confirmation.Hide(); await OnDelete.InvokeAsync(_customerToDelete); await CustomerRepo.Delete(Endpoints.CustomersEndpoint, _customerToDelete); await LoadCustomers(1, 10); }
protected override async Task HandleKeyUpAsync(KeyboardEventArgs args) { await base.HandleKeyUpAsync(args); var key = args.Key; if (key == " " || key == "Enter") { await HandleClickAsync(args); } else if (Deletable && (key == "Backspace" || key == "Delete")) { await OnDelete.InvokeAsync(args); } else if (key == "Escape") { await DomHelpers.BlurAsync(RootRef.Current); } }
public async Task Delete(TItem item) { if (!OnDelete.HasDelegate) { return; } var delete = await JsUtils.Confirm($"Are you sure you want to delete selected item?"); if (delete) { var viewModelWithId = item as ViewModelWithId; if (viewModelWithId == null) { throw new NotSupportedException($"View model '{typeof(TItem).Name}' should be inherited from {nameof(ViewModelWithId)}"); } await OnDelete.InvokeAsync(item); } }
public async Task Delete() { await OnDelete.InvokeAsync(TodoItem); }
public async Task DeleteConfirmedAsync() { await NodeService.DeleteAsync(Id); await OnDelete.InvokeAsync(Id); }
public async Task Delete() { Console.WriteLine($"Deleting {TodoItem.Name}"); await OnDelete.InvokeAsync(TodoItem); }
protected void HandleDelete(TItem item) { OnDelete.InvokeAsync(item); }
public async Task Delete() { await OnDelete.InvokeAsync(TodoList); }
protected async Task HandleDeleteClickAsync(EventArgs args) { await OnDelete.InvokeAsync(args); }