Make 2 tables with row or column selectable=single - you can only select one row and one column on the page, should be one per table.
import dash
import dash_html_components as html
import dash_table
keys = ['a', 'b', 'c']
data = [{'a': 'a', 'b': 'b', 'c': 'c'}, {'a': 'aa', 'b': 'bb', 'c': 'cc'}]
app = dash.Dash(__name__)
app.layout = html.Div([
dash_table.DataTable(
id='a',
columns=[{"name": i, "id": i, "selectable": True} for i in keys],
data=data,
column_selectable='single',
row_selectable='single'
),
dash_table.DataTable(
id='b',
columns=[{"name": i, "id": i, "selectable": True} for i in keys],
data=data,
column_selectable='single',
row_selectable='single'
)
])
if __name__ == '__main__':
app.run_server(debug=True)