另一个弹出窗口打开后,Kendo Angular UI对话框确认框未显示

时间:2019-05-08 10:43:20

标签: angular kendo-ui kendo-angular-ui

我有一个Kendo-angular-ui对话框确认框,当之前有另一个弹出式div打开时,该对话框不显示。以前没有打开过任何弹出窗口时,工作正常。

弹出式div,对话框打开后不允许打开

 <div id="myModal" class="popupModel" *ngIf="show">
    <!-- Modal content -->
    <div class="{{popupIdentifer.CssClass}}">
      <div class="popupModel-header">
        <span class="close" (click)="onClose()">&times;</span>
        <h2>{{popupIdentifer.Title}} <span *ngIf="popupIdentifer.Key == popupIdentifers.AddQuestion.Key">({{addQuestionCounter}})</span></h2>
      </div>
      <div class="popupModel-body">
        <topic-layout *ngIf="popupIdentifer.Key == popupIdentifers.Topic.Key" [programDetailID]="programDetailID" (topicRefresh)="topicRefresh($event)"></topic-layout>
        <audience-layout *ngIf="popupIdentifer.Key == popupIdentifers.Audience.Key" [programDetailID]="programDetailID" (audienceRefresh)="audienceRefresh($event)"></audience-layout>
        <add-question *ngIf="popupIdentifer.Key == popupIdentifers.AddQuestion.Key" (questionCounter)="questionCounter($event)" (close)="close($event)" [programDetailID]="programDetailID"></add-question>
      </div>

    </div>

  </div>

我的对话框服务

 public removeHandler({ dataItem }): void {
    const dialog: DialogRef = this.dialogService.open({
      title: "Primary Insights",
      content: "Are you sure you want to remove?",
      actions: [
        { text: "No" },
        { text: "Yes", primary: true }
      ],
      width: 520,
      minWidth: 250
    });

    dialog.result.subscribe((result) => {
      if ((result as any).text === "Yes") {
        const question: Question = dataItem;
        const index = this.questions.findIndex(({ questionID }) => questionID === question.questionID);
        question.isDeleted = true;
        this.questionService.update(question).subscribe(
          result => {
            if (result.success) {
              this.questions.splice(index, 1);
              this.loadItems();
              this.showAlert("Success! User has been successfully removed.", "success");
            }
            else {
              //this.openDialog("Error", result.message);
              this.showAlert("Oops! There is some issue!! Please try again.", "error");
            }
          });
      }
    });

  }

0 个答案:

没有答案