Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Pagination doesn't work when more than one table is on the page #834

Closed
@chriddyp

Description

import dash
import dash_table
import dash_html_components as html
import pandas as pd

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')

app = dash.Dash(__name__)

table1 = dash_table.DataTable(
    id='table1',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict('records'),
    page_action="native",
    page_size=5,
)

table2 = dash_table.DataTable(
    id='table2',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict('records'),
    page_action="native",
    page_size=7,
)

app.layout = html.Div([
    table1,
    table2
])

if __name__ == '__main__':
    app.run_server(debug=True)

As reported in https://community.plotly.com/t/potential-bug-dash-datatable-paging-for-multiple-datatables-on-the-same-page/45431

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions