Attempting to click items in one Tabulator to populate “selected” items in another Tabulator, positioned below the first. When following the procedure below, the second Tabulator “moves up”, and then the first expands to “overlap” the second. Here’s the procedure:
- Select a few items in the first table (they will appear in the second)
- Click “Last” to go to the last page of the first table.
- Select a few more items in the first table (they add properly to the second table)
- Click “First” to go back to the first page of the first table (you’ll see the longer first page now overlaps the second table.
Here’s the MRE:
import panel as pn import pandas as pd import numpy as np from panel.widgets import Tabulator def select_item(event): data.loc[event.row, 'selected'] = True table_selected.value = data[data['selected']] columns = [i for i in 'abcdefghij'] data = pd.DataFrame(np.random.randint(100, size=(310,10)), columns=columns) data['selected'] = False table = Tabulator(value=data) table_selected = Tabulator(value=data[data['selected']]) table.on_click(select_item) layout = pn.Column('# First Header', table, '# Second Header', table_selected) pn.serve(layout)
Is this a bug? Is there a better way to do this? This is a workaround since I can’t use the “selectable” behavior of Tabulator across multiple pages (as it does not persist).