Im getting the below warning always when merge cells for version “12.0.1”.
“The merged cell declared at [x, x] has both “rowspan” and “colspan” declared as “1”, which makes it a single cell. It cannot be added to the collection.”
Im getting the below warning always when merge cells for version “12.0.1”.
“The merged cell declared at [x, x] has both “rowspan” and “colspan” declared as “1”, which makes it a single cell. It cannot be added to the collection.”
Are you able to replicate the same issue using this demo https://jsfiddle.net/h8fawpx7/?
I’ve tried to merge different cell groups and did not come across any issues.
ps. I was testing it on Chrome 103 / macOS Monterey.
Im using Angular12, in that when ever I update the setting for mergecells I’m getting this warning.
example code:
hotTable.updateSettings({mergeCells:mergCells});
Its not breaking anything but my performance is very slow
OK, so without checking the code I think that your mergCells
array is pretty long and it contains cells that are not merged, meaning here below we have an example of an array of merged cells
mergeCells: [
{ row: 1, col: 1, rowspan: 3, colspan: 3 },
{ row: 3, col: 4, rowspan: 2, colspan: 2 },
{ row: 5, col: 6, rowspan: 3, colspan: 3 }
],
however, the warning states that you use 1
for rowspan
and colspan
, and that does not do you any favors. Is that what is happening?
I’m not having any merge cells for rowspan and colspan equals to 1, but still I’m getting this warning. My mergecells array is huge, will that cause this issue ?
I think I got the issue. Duplicate code was causing the issue. Sorry for the inconvenience.