@dqiu I’m not sure I understand the behavior you are experiencing. Could you provide an example that exhibits the problem so I can see if this is a bug in the DataTable or something I can help you with? Thanks.
When dealing with horizontal and vertical scrolling with fixed columns, it seems like you need to specify the minHeight, height, and maxhHeight properties when styling the table. With the following code I was able to adjust the size of the table.
app.layout = html.Div([
dash_table.DataTable(
id='table',
columns=[{"name": i, "id": i} for i in df.columns],
data=df.to_dict('records'),
fixed_columns={'headers': True, 'data': 2},
fixed_rows={'headers': True, 'data': 0},
style_table={
'minHeight': '600px', 'height': '600px', 'maxHeight': '600px',
'minWidth': '900px', 'width': '900px', 'maxWidth': '900px'
},
)
])
@dqiu Sure, you could set the values to ‘100vh’ and ‘100vw’ respectively and that will expand the table to fit the browser viewport. I am noticing with this specific table that some of the headers clip into the columns, so you may also want to adjust individual column widths as well.