Performance issues with dialog boxes

Hello,

When I open and close dialog boxes I have performance issues.

Let's say I have a button to open a dialog box on my page and in that dialog box I have an input text.
The first time I open the dialog box, there is no issue, everything is fine. But if I close it and open it again, the input text will be slower, there will be latency between input and display. The more dialogs I open and close, the slower it's going to be.

So I was wondering if I was missing something. Maybe I'm not removing the dialogs the proper way.

Here is my code :

<ejs-dialog
    #dialog
    id="id-dialog"
    *ngIf="isDialogOpen" // to prevent display at init
    [animationSettings]="animationSettings"
    [showCloseIcon]="showCloseIcon"
    [width]="detailWidth"
    allowDragging="true"
    isModal="true"
    zIndex="998"
    (close)="removedFinaliserWatch()"
  >
    <ng-template #content>
      <div class="dialog-detail">
        <some app with input texts/>
      </div>
    </ng-template>
  </ejs-dialog>
removedFinaliserWatch() {
    let dlgEle: any = document.getElementById(
      "id-dialog"
    ).parentElement;
    dlgEle && dlgEle.remove(); // I also tried destroy()
  }

1 Reply

VJ Vinitha Jeyakumar Syncfusion Team July 12, 2022 01:29 PM UTC

Hi Julien,


We have tried to replicate the reported issue at our end using the code you have shared. but we couldn't replicate the issue at our end. we have also prepared a sample for your reference,


Can you please share the below details,

  • Exact issue reproducing steps,
  • Issue replicating video illustration,
  • Entire code snippet to replicate the issue.
  • If possible, please share us with the runnable issue reproducing sample.

Regards,
Vinitha

Loader.
Up arrow icon