Skip to content

bool(DashTable) is always False #2906

Open

Description

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

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething brokenfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions