I am encountering an issue with the Syncfusion Angular Dialog component. When I attempt to close the dialog, I receive the following errors:
TypeError: Cannot use 'in' operator to search for '__eventList' in null
TypeError: Cannot read properties of null (reading 'parentElement') at checkInputValue (input.js:151:39) at Object.setValue2 [as setValue] (input.js:534:9) at DropDownList2.destroy (drop-down-list.js:3828:19) at PagerDropDown2.destroy (pager-dropdown.js:164:37) at ModuleLoader2.clean (module-loader.js:57:55)
The second issue occurs intermittently, not every time the dialog is closed.
I have created a working example on StackBlitz that demonstrates the problem:
Steps to Reproduce
Hi Buddhi,
We have confirmed the issue as “Script error thrown in switch when open and closing dialog component" and logged a defect report. We will include the fix for this issue in the upcoming weekly release scheduled for the second week of August 2024.
You will be informed regarding this once the fix is published.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
KeerthiKaran K V
Hi KeerthiKaran,
Thank you for your prompt response regarding the issue related to the script error in the dialog component. We appreciate your attention to this matter.
We understand that the fix is scheduled for inclusion in the upcoming weekly release planned for the second week of August 2024. We will eagerly await the update and appreciate your efforts in resolving this issue.
Please feel free to reach out if you have any further details or need additional information from our end.
Best regards,
Buddhi
Hi Buddhi,
We are glad to announce that our weekly patch release (26.2.9) has been rolled out. We have included the fix for this “Script error thrown in switch when open and closing dialog component” issue in this release. So, we suggest you upgrade our Syncfusion packages to our latest version to resolve this issue on your end (26.2.9)
Root cause: The underlying reason for the problem is that we failed to check the null condition for the switch wrapper element before destroying the switch component.
Sample link: https://stackblitz.com/edit/stackblitz-starters-3fjc2f?file=src%2Fcomponent%2Fswitch-box%2Fswitch-box.component.html
Release notes: https://ej2.syncfusion.com/angular/documentation/release-notes/26.2.9?type=all#switch
Package link: https://www.npmjs.com/package/@syncfusion/ej2-angular-buttons
Get back to us if you need any further assistance on this.
Regards,
KeerthiKaran K V