Very similar to Datatable disappears with filtering and virtualization (and relatedly [BUG] Can not read properties of undefined ... · Issue #2209 · plotly/dash · GitHub) but without virtualization.
from dash import Dash, dash_table
import pandas as pd
app = Dash(__name__)
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')
app.layout = dash_table.DataTable(
data=df.to_dict('records'),
columns=[{"name": i, "id": i} for i in df.columns],
virtualization=False,
fixed_rows={'headers': True},
filter_action='native',
page_action='native',
page_size=10,
style_cell={
'border': 'none',
'padding':'0px',
'width':'100px',
},
fill_width=False,
)
if __name__ == '__main__':
app.run_server(debug=True)
Put in a filter value that will filter out all rows. The table disappears.
Changing border, padding or cell_width doesn’t make it disappear completely, but still collapses it into something unusable.