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()
}