</>
def data_table(id_name):
return html.Div(dash_table.DataTable(id=id_name,
style_header={‘backgroundColor’: ‘#D8DDEB’,
‘fontWeight’: ‘bold’,
‘whiteSpace’: ‘normal’,
‘height’: ‘auto’,
},
style_cell={ ‘fontFamily’:‘sans-serif’,
‘width’:‘120px’},
style_data={
‘whiteSpace’: ‘normal’,
‘height’: ‘auto’,
},
style_table = {
‘overflowX’:‘auto’,
‘overflowY’:‘auto’,
‘maxHeight’:“400px”
},
export_format=“csv”,
style_cell_conditional = [
{
‘if’:{
‘column_type’:‘text’
},
‘textAlign’:‘left’
},
{
‘if’:{
‘column_type’:‘numeric’
},
‘textAlign’:‘right’
}
],
fill_width=False
),
className = ‘mx-auto’)
</>