dash
dash copied to clipboard
bool(DashTable) is always False
Describe your context
dash 2.17.1
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
Describe the bug
bool(DashTable) is always False. I can't use tb or []
for shorthand when there is no data
from dash import dash_table
df = pd.DataFrame({'a': [1, 2]})
tb = dash_table.DataTable(df.to_dict('records'), columns=[{'name': column, 'id': column} for column in df.columns])
print(bool(tb))
Expected behavior
bool(tb) evaluates to True, either always or when there is data
Screenshots