I have create a Dash table with my changelog and put this table on a dbc.Card: This is the function for generating the table:
def getChangelogContent(self):
self.dfLog['Date_Formatted'] = pd.to_datetime(self.dfLog['Date'],utc=True).dt.strftime('%Y-%m-%d')
ChangeTableData = dash_table.DataTable(
id='changeTable',
columns=[{"name": 'Date', "id": 'Date_Formatted'},
{"name": 'Version', "id": 'Version'},
{"name": 'Changes', "id": 'Changes'}],
#data=self.dfLog.to_dict('records'),
data=self.dfLog.to_dict("records"),
style_table={
'padding':'20px',
'width': '100%',
'minWidth': '100%',
},
style_data={'whiteSpace': 'normal',
'overflow': 'hidden',
'textOverflow': 'ellipsis',},
style_cell={
'height':'auto',
'backgroundColor': '#32383e',
'color': "#aaaaaa",
'textAlign': 'left',
'whiteSpace': 'normal',
'overflow': 'hidden',
'textOverflow': 'ellipsis',},
style_header={
'backgroundColor': '#3A3F44',
'color': "white",
'fontWeight': 'bold'},
editable=True
)
return ChangeTableData
and this is the placement on the dbc.Card:
tab_Changelog = dbc.Card(dbc.CardBody([html.H4("Changelog"),
ChangelogManager.getChangelogContent()]))
I tried a log to automatically wrap the text, if the window and so the card is too small. But everything I tried, didn't work. Any ideas, what I am doing wrong? Thanks a lot.
