Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 public async Task Delete()
 {
     await OnDelete.InvokeAsync(TodoItem);
 }
Ejemplo n.º 6
0
        public async Task DeleteConfirmedAsync()
        {
            await NodeService.DeleteAsync(Id);

            await OnDelete.InvokeAsync(Id);
        }
Ejemplo n.º 7
0
 public async Task Delete()
 {
     Console.WriteLine($"Deleting {TodoItem.Name}");
     await OnDelete.InvokeAsync(TodoItem);
 }
Ejemplo n.º 8
0
 protected void HandleDelete(TItem item)
 {
     OnDelete.InvokeAsync(item);
 }
Ejemplo n.º 9
0
 public async Task Delete()
 {
     await OnDelete.InvokeAsync(TodoList);
 }
Ejemplo n.º 10
0
 protected async Task HandleDeleteClickAsync(EventArgs args)
 {
     await OnDelete.InvokeAsync(args);
 }