DropDownList inside TreeGrid table column giving "ExpressionChangedAfterItHasBeenCheckedError" error

Hi,

I am using DropDownList component inside TreeGrid column template to render the content. But DropDownList component is not working correctly if I define itemTemplate inside DropDownList to render items with modified HTML. It is giving me following error


Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after
it was checked. Previous value: 'null: undefined'. Current value: 'null: a'. It seems like the view has been
created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?


Following I debugged:
If I remove itemTemplate of DropDownList component or if move the DropDownList component outside the TreeGrid component then the error goes away and works fine.

Here is the reproduction link:
https://stackblitz.com/edit/angular-ujg3zd?file=app.component.html,jsontreegriddata.ts,app.component.ts

Thanks


3 Replies

PS Pon Selva Jeganathan Syncfusion Team June 17, 2022 02:52 PM UTC

Hi Tarun,   


Thanks for contacting syncfusion forum.


Query: DropDownList component is not working correctly if I define itemTemplate inside DropDownList to render items with modified HTML. It is giving me following error


We checked your shared sample, but we were unable to reproduce the issue at our end.


Please refer to the below video demo,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/Dropdown_inside_treegrid-2147187755


Please refer to the below general link related on your error,

https://angular.io/errors/NG0100

https://blog.angular-university.io/angular-debugging/


After following the above reference, still faced issue please share us the following details.


  1. Share the detailed explanation of your issue.
  2. Share the issue replication steps.
  3. Share the video demo of the issue.
  4. Share the full script error details
  5. If it is possible, Share the issue reproducible sample.
  6. Share the product version details


The provided information will be helpful to provide your response as early as possible. 


Regards, 

Pon selva  



TA Tarun June 17, 2022 04:57 PM UTC

Hi Pon,

Thanks for replying.

I have already given you this reproduction link:
https://stackblitz.com/edit/angular-ujg3zd?file=app.component.html,jsontreegriddata.ts,app.component.ts


check the console you will see the issue.



PS Pon Selva Jeganathan Syncfusion Team June 20, 2022 05:43 PM UTC

Hi Tarun,   


Thanks for the update.


We have created a new incident under your Direct trac account to follow up with this query.  We suggest you to follow up with the incident for further updates. Please log in using the below link.   

   

https://www.syncfusion.com/account/login  


Regards, 

Pon selva  


Loader.
Up arrow icon