Menu template does not refresh on state changes

Hi,
I'm using the MenuComponent in React and when changing a state variable, the template for the menu items does not get refreshed.
Example provided in the attached file: I have a boolean state variable called "enabled" (initial value: false), when clicking on the single menu item, the value of "enabled" gets changed (i.e. changed to true). However, the template for the menu item stays as it is (it should change the text of the menu item from "Disabled" to "Enabled").

What can I do?

Attachment: DHeader_8885d72.zip

2 Replies 1 reply marked as answer

AS Aravinthan Seetharaman Syncfusion Team November 18, 2020 04:18 PM UTC

  
Hi Laurin S, 
  
We have checked your reported query. We need to validate more on this issue. We will update further details on 19 November 2020, and we appreciate your patience until then. 
  
Regards, 
Aravinthan S. 



AS Aravinthan Seetharaman Syncfusion Team November 20, 2020 06:16 AM UTC

Hi Laurin S, 
  
We have checked your requirement and it can be achieved by using beforeItemRender instead of template. Since state is used for our component properties directly. So, based on your scenario we have prepared sample using beforeItemRender and refresh our component after state has been changed in the select event. 
Please find sample link below, 
  
Could you please check the above details and get back to us, if you need any further assistance on this. 
 Regards, 
Aravinthan S. 


Marked as answer
Loader.
Up arrow icon