custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

'align' option NOT affect column header - in some case, is it OK ? #52

Closed Masterz69 closed 2 years ago

Masterz69 commented 3 years ago

flex-table-card version/revision 3395cff

Column obey 'align' option, but header stay left-aligned. Config example and screenshot attached.

              - data: battery
                name: Battery (%)
                align: right
                modify: 'isNaN(parseInt(x, 10)) ? "-" : parseInt(x, 10)'
              - data: voltage
                name: Voltage
                align: right
                modify: 'isNaN(parseInt(x, 10)) ? "-" : parseInt(x, 10)'
...
              th.left: 'padding: 0px 0px 10px 10px'
              th.right: 'padding: 0px 0px 10px 10px'

image

If change from th.left + th.right to 'just' th, like:

              th: 'padding: 0px 0px 10px 10px'

header alignment follow column:

image