commandColumn undefined in commandClick when react state changed?

Hi,

see the following example: Demo

The example reproduces an issue with commandColumn not defined in grid's commandClick event handler. When example is loaded, click on any delete button and alert will show the commandColumn as expected. Afterwards click the test button and try any delete button again. Now, the alert shows "undefined" for commandColumn.

Please confirm and how can I fix it?

This blocks me a lot. I want to use the command column but any state change like a fetch call with nextjs/SWR breaks the command column.

EDIT: Seems to be a general problem. "grid.addRecord()" doesn't work after state change, too: "TypeError: col.edit.create is not a function"

Regards,
Steffen

4 Replies 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team October 12, 2020 01:28 PM UTC

Hi Steffen, 

Greetings from syncfusion support 

We are able to reproduce the reported issue at our end. currently we are validating this at our source side, so we will update the further details by tomorrow Oct 13th 2020. 

Until then we appreciate your patience. 

Regards, 
Rajapandi R 



RR Rajapandi Ravi Syncfusion Team October 13, 2020 12:03 PM UTC

Hi Steffen, 

Thanks for your patience 

The reported issue occur in the older version Syncfusion package (v 18.2.59) and it has been fixed and released in the latest release Version ( v 18.3.35). So we suggest to please upgrade the latest Grid version to resolve the issue. For your reference we prepared a stackblitz sample of Grid with 18.3.35 package version. Please refer the below sample for more information.  


Regards, 
Rajapandi R   


Marked as answer

SH Steffen Harbich October 16, 2020 06:34 AM UTC

Thanks, that worked.


RR Rajapandi Ravi Syncfusion Team October 19, 2020 12:04 PM UTC

Hi Steffen, 

We are happy to hear that your issue resolved.  

Please get back to us if you need further assistance. 

Regards, 
Rajapandi R 


Loader.
Up arrow icon