update data causing the whole treeview to re-rendering.

I found there is already one reported. But the issue does not seem to be updated.

In the final example: https://stackblitz.com/edit/react-vtew1m?file=src%2FApp.js

It does not apply the nodeTemplate, it should be like this:

      <TreeViewComponent
        fields={fields}
        nodeTemplate={nodeTemplate} 
        statelessTemplates={['nodeTemplate']}
      />

Then you will find the issue is still the same.





1 Reply

SA SureshRajan Alagarsamy Syncfusion Team June 30, 2023 01:44 PM UTC

Hi Zero,


We have reviewed your query and understand that you are experiencing a re-rendering issue with the TreeView component, even though you have used the "statelessTemplates" property. Upon further validation, we have identified that you are currently using Syncfusion - Navigation version 20.2.44. However, support for the "statelessTemplates" property was provided in version 20.4.38. Therefore, we recommend upgrading your version to 20.4.38 or a higher version.


We have attached the release notes for your further reference.


Release Notes : https://ej2.syncfusion.com/react/documentation/release-notes/20.4.38/?type=all#common


We have also upgraded your provided sample to the latest version and tested it. The TreeView control no longer experiences re-rendering issue and functions as expected. We have attached a sample for your reference.


Sample : https://stackblitz.com/edit/react-84yn5j?file=src%2FApp.js


Check out the shared details and get back to us if you need any further assistance.


Regards,
Suresh.


Loader.
Up arrow icon