Hello,
I'm attempting to align an entire column (data cells and header), but the following only applies to the data cells:
columnStyles: {
0: {halign: "right"},
5: {halign: "right"}
}
The headers for columns 0 and 5 are not right-aligned.
I also tried the following in conjunction with the above-mentioned columnStyles to no avail:
headerStyles: {
0: {halign: "right"},
5: {halign: "right"}
}
Any help would be greatly appreciated.
i also getting this problem :(
Can you provide a runnable example where the issue is reproduced?
i mean using keys or values in columnStyles is working perfectly.
columnStyles: {
0: {halign: "left"},
}
or
columnStyles: {
'title': {halign: "left"},
}
but, when it comes to headerStyles, I cannot specifically align a column.
like
headerStyles: {
0: {halign: "left"},
}
or
headerStyles: {
'title' : {halign: "left"},
}
by the way, i love your plugin. it is really fast.
Got it! Currently you might have to do that with hooks. Whats your use case? Do you think it is better to include the header in the column styles by default? Currently the column styles are only applied for body section I think.
Ok thank you! i get it now. Yes I think it is better to include header in the column styles, it will make things more easier.
Will take a second look at it then before releasing v3 馃憤
Is this resolved? It seems that the column alignment is still not applied to the headers.
If anyones looking for an easy fix you can always style a specific column header this way
head: [[{content: 'Services', styles: {halign: 'left'}}, 'Qty', 'Unit Price', 'Subtotal']]
Still not working for me with the latest v3.5.14. Any alternatives?
Most helpful comment
If anyones looking for an easy fix you can always style a specific column header this way
head: [[{content: 'Services', styles: {halign: 'left'}}, 'Qty', 'Unit Price', 'Subtotal']]