This definition causes error:
{ content:[
{
table:{
widths:['auto','auto'],
body:[
[ {text:'header', colSpan:2} ],
['abc','def']
]
}
}
]}
but, moving the first row with colSpan to second row, displays correctly;
{ content:[
{
table:{
widths:['auto','auto'],
body:[
['abc','def'],
[ {text:'header', colSpan:2} ]
]
}
}
]}
I ran into a similar issue, I believe you need an empty element in your first example try this instead
{
content:[
{
table:{
widths:['auto','auto'],
body:[
[ {text:'header', colSpan:2}, {text:''} ], //note the second object with empty string for 'text'
['abc','def']
]
}
}
]
}
They must be defined all cells of table. This is a feature (probably poor, but it is so.).
I just wasted 2 hours of my time into this issue!!! Please refer back to this issue in the Playground so people don't lose their minds over this weird behaviour.
Most helpful comment
I ran into a similar issue, I believe you need an empty element in your first example try this instead