Exemplo n.º 1
0
 public async Task CloseDialogAsync(ModalDialogInstance modalDialogInstance)
 {
     await InvokeAsync(async() =>
     {
         await JSRuntime.InvokeVoidAsync("hideModalDialog", modalDialogInstance.Id);
         ModalDialogItems.Remove(modalDialogInstance);
         StateHasChanged();
     });
 }
Exemplo n.º 2
0
        public async Task <ModalDialogInstance> OpenDialogAsync(string title, RenderFragment body, ModalDialogSize modalDialogSize)
        {
            var modalDialogInstance = new ModalDialogInstance(title, body, modalDialogSize, ModalDialogService);

            await InvokeAsync(() =>
            {
                ModalDialogItems.Add(modalDialogInstance);
                StateHasChanged();
            });

            return(modalDialogInstance);
        }
Exemplo n.º 3
0
 public async Task CloseAsync(ModalDialogInstance modalDialogInstance)
 {
     await OnClose?.Invoke(modalDialogInstance);
 }