plotly / dash-table-experiments

NO LONGER SUPPORTED - use https://github.com/plotly/dash-table instead
MIT License
174 stars 57 forks source link

Issue with select all and multiple DataTables #79

Open antgar88 opened 6 years ago

antgar88 commented 6 years ago

Hi all,

I've recently been facing an issue when I try to use more than one table in the same layout (simple code attached)

import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_table_experiments as dte
import pandas as pd

table1 = pd.DataFrame([[1,2],[2,1]],columns=['Col1-1','Col2-1'])
table2 = pd.DataFrame([[1,2],[2,1]],columns=['Col1-2','Col2-2'])

app = dash.Dash()

app.layout = html.Div([dte.DataTable(id='table1', rows=table1.to_dict('records'), row_selectable=True),
                            html.Div(style={'margin': '5% 0 0 '}),                     
                          dte.DataTable(id='table2', rows=table2.to_dict('records'), row_selectable=True)
           ])

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

Once you run the server and try to select all rows in second table, then all rows in first table are selected automatically instead of second table. However, this issue happens arbitrarily.

Any idea or suggestion?

Thank you!