Formatting multiindex headers

Hi,

I’m using DataTable that should have 2 levels in headers. Basically, color of a column depends whether it is editable or not (editable are dark).

Formatting is done with the following code:

style_header_conditional = [
# Editable columns will have different text color
{
‘if’: {‘column_editable’: True},
‘color’: ‘white’,
‘backgroundColor’: current_app.config[“COLOR_GREY”]
},
# Text alignment in top header row
{
‘if’: { ‘header_index’: 0 },
‘textAlign’: ‘center’
},
# Text alignment in bottom header row
{
‘if’: { ‘header_index’: 1 },
‘textAlign’: ‘center’
}
],

And it looks okish:

However, it gets complicated with this option:

merge_duplicate_headers = True

For unknown reason those 3 top headers (Nov, Dec and Jan) gets formatted and the others not (all columns starting from July onwards are editable):

Do you recollect why this could be the case?

Hi @Hikari

Looks like you found a bug. :beetle:
It’s been reported and you can follow any progress here

Hi, many thanks for info!

1 Like