-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Bug with Dash DataTable with Pagination #2347
Comments
You're running a rather old version of Dash (1.21.0 was released in July 2021). So I took this for a spin on Dash 2.7.0 and can confirm that this problem still exists. Here's a more minimal example that displays the issue: from datetime import date
from dash import dcc, html, dash_table, Input, Output, Dash
import pandas as pd
df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv"
)
app = Dash(__name__)
app.layout = dash_table.DataTable(
columns=[{"name": col, "id": col} for col in df.columns],
data=df.to_dict("records"),
page_size=10,
tooltip_conditional=[
{
"if": {
"filter_query": '{country} = "Albania"',
"column_id": "continent",
},
"value": "Country: Albania",
}
],
)
if __name__ == "__main__":
app.run_server(debug=True) The issue appears to involve the combination of the conditional tooltip while on a page beyond the first: when the app loads and before changing pages, hovering over the cell in the second row in the "continent" column triggers the tooltip, as expected (as the country value is "Albania"), however after moving to the second page, hovering over any cell in the content column will trigger a pile of JavaScript errors and make the app unresponsive. |
@alexcjohnson Can i pick this up? |
@aneeshdua go for it! Let me know if you have any trouble finding the right areas of the source code to poke around. |
@alexcjohnson @ned2 I am also able to reproduce the bug. The two React console errors that occur are as follows:
I believe the 1st error is of the dash-renderer component and my hunch is the problem lies in the tooltip_conditional code of the dash-table component. Based on the 2nd error, I was able to make out a few points:
Please let me know if I am in the right direction. Meanwhile, I will try to dig deeper into the Syntax-tree part of the dash-table code. If possible please share the overall role of the syntax-tree code. P.S. - I am still novice to open source. Please correct me if I make a mistake. Thanks! |
I've run into a bug with Dash datatables, where tables with pagination that have tooltips keep generating errors if you hover over them. The DataTable becomes non responsive after the errors are thrown, and doesn't work until you refresh the app.
Made a simple dash app to reproduce the error. To trigger the issue navigate the table until you find the highlighted cell and hover over the table. The dash app code is:
My environment is as follows:
The error thrown in debug is:
Screenshots
The text was updated successfully, but these errors were encountered: