[GH #6747] setCellMeta still sets Meta to wrong row index

Tags: #<Tag:0x00007f8b1ad651a8> #<Tag:0x00007f8b1ad65068>

Hi,

I have the exact same problem as @aabounegm, stated in the following issue: setCellMeta doesn’t work properly in afterCreateRow hook.

I am trying to switch some cells from readOnly: true to readOnly: false when a new line is created. Unfortunately, the cells from the next row are affected, not the cells from the created row. To make it work, I need to use setTimeout(), just like in the topic I linked.

Issue was supposedly fixed, but it still exists in the current version: http://jsfiddle.net/fz9w5ayo/1/

Am I missing anything?

You’re right. The readOnly should be added cell row index 4, not 5. I do not see any similar issue reported so I have added it to our Github board here https://github.com/handsontable/handsontable/issues/6747
The setTimeout() shouldn’t be needed.

I will update you as soon as we get it solved.

1 Like