question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

columnStyles column-specific alignment doesn't apply to corresponding header

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
kyleabenscommented, Apr 19, 2019

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']]

4reactions
CyborgMastercommented, Apr 2, 2019

Is this resolved? It seems that the column alignment is still not applied to the headers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: column headers alignment based on column data
Solved: I would like to apply different alignments to columns within the same table. Table design best practices dictate that column headers should....
Read more >
Why are the two columns in the HTML table header not ...
The solution is to understand that applying the .button class to a table cell does not work the same as applying it to...
Read more >
Working with Cell or Range Formatting - Syncfusion
This is a recommended approach to apply single style in different rows and columns, which improves memory and performance considerably. To learn more...
Read more >
Visualization: Column Chart - Google Developers
A column chart is a vertical bar chart rendered in the browser using SVG or VML, whichever is appropriate for the user's browser....
Read more >
Fit more text in column headings - Microsoft Support
When wrapping or vertically formatting text doesn't resolve this problem, you can use rotated text and cell borders instead. Newer versionsOffice 2011.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found