private async Task Cancel(MouseEventArgs args) { if (OnCancel.HasDelegate) { await OnCancel.InvokeAsync(args); } await base.Hide(); }
public virtual void InvokeClickOutside() { if (Visible && CloseOnOutsideClick == true) { StartDate = OldStartValue; EndDate = OldEndValue; Close(); OnCancel.InvokeAsync(false); } }
public async Task ClickCancel(MouseEventArgs e) { TStartDate = StartDate; TEndDate = EndDate; HoverDate = null; await Close(); await OnCancel.InvokeAsync(e != null); }
private DialogOptions BuildDialogOptions() { DialogOptions options = new DialogOptions() { OnClosed = AfterClose, BodyStyle = BodyStyle, CancelText = CancelText, Centered = Centered, Closable = Closable, Draggable = Draggable, DragInViewport = DragInViewport, CloseIcon = CloseIcon, ConfirmLoading = ConfirmLoading, DestroyOnClose = DestroyOnClose, Footer = Footer, ForceRender = ForceRender, GetContainer = GetContainer, Keyboard = Keyboard, Mask = Mask, MaskClosable = MaskClosable, MaskStyle = MaskStyle, OkText = OkText, OkType = OkType, Title = Title, Width = Width, WrapClassName = WrapClassName, ZIndex = ZIndex, OnCancel = async(e) => { if (OnCancel.HasDelegate) { await OnCancel.InvokeAsync(e); } }, OnOk = async(e) => { if (OnOk.HasDelegate) { await OnOk.InvokeAsync(e); } }, OkButtonProps = OkButtonProps, CancelButtonProps = CancelButtonProps, Rtl = Rtl }; return(options); }
protected void Cancel() { Hide(); OnCancel.InvokeAsync(this); }
protected async Task CancelAsync() { await OnCancel.InvokeAsync(null); }
public async Task CancelAsync() { await OnCancel.InvokeAsync(Id); Close(); }
#pragma warning restore 649 private DialogOptions BuildDialogOptions() { DialogOptions options = new DialogOptions() { OnClosed = AfterClose, BodyStyle = BodyStyle, CancelText = CancelText ?? Locale.CancelText, Centered = Centered, Closable = Closable, Draggable = Draggable, DragInViewport = DragInViewport, CloseIcon = CloseIcon, ConfirmLoading = ConfirmLoading, Footer = Footer, GetContainer = GetContainer, Keyboard = Keyboard, Mask = Mask, MaskClosable = MaskClosable, MaskStyle = MaskStyle, OkText = OkText ?? Locale.OkText, OkType = OkType, Title = Title, TitleTemplate = TitleTemplate, Width = Width, WrapClassName = WrapClassName, ZIndex = ZIndex, OnCancel = async(e) => { var args = new ModalClosingEventArgs(e, false); var modalTemplate = (ModalRef as IFeedbackRef)?.ModalTemplate; if (modalTemplate != null) { await modalTemplate.OnFeedbackCancelAsync(args); } if (!args.Cancel) { await(ModalRef?.OnCancel?.Invoke() ?? Task.CompletedTask); if (OnCancel.HasDelegate) { await OnCancel.InvokeAsync(e); } } }, OnOk = async(e) => { var args = new ModalClosingEventArgs(e, false); var modalTemplate = (ModalRef as IFeedbackRef)?.ModalTemplate; if (modalTemplate != null) { await modalTemplate.OnFeedbackOkAsync(args); } if (!args.Cancel) { await(ModalRef?.OnOk?.Invoke() ?? Task.CompletedTask); if (OnOk.HasDelegate) { await OnOk.InvokeAsync(e); } } else { ConfirmLoading = false; await InvokeStateHasChangedAsync(); } }, OkButtonProps = OkButtonProps, CancelButtonProps = CancelButtonProps, Rtl = Rtl, MaxBodyHeight = MaxBodyHeight }; return(options); }
public void HandleCancel() { OnCancel.InvokeAsync(null); IsOpen = false; }
protected async Task OnCancelModel() { formValidator.ClearErrors(); ModelData = currentModelData; await OnCancel.InvokeAsync(currentModelData); }