Tabulator filtering with add_filter and selection problem

Hi all,

I had a problem to use the tabulator.selection after filtering the table with tabulator.add_filter because after filtering the data, the table index is changed.

import pandas as pd
import panel as pn
mixed_df = pd.util.testing.makeMixedDataFrame()
filter_table = pn.widgets.Tabulator(mixed_df)
slider = pn.widgets.RangeSlider(start=0, end=3, name=‘A Filter’)
filter_table.add_filter(slider, “A”)
select = pn.widgets.MultiSelect(options=[‘foo1’, ‘foo2’, ‘foo3’, ‘foo4’, ‘foo5’], name=‘C Filter’)
filter_table.add_filter(select, ‘C’)
pn.Row(
pn.Column(slider, select),
filter_table
)

Below image for further reference.
image

What I did here was change the A from 1 to 3 and then assign the selection value to [2]. By this process, the tabulator were updated by highlighted the row with index 3. Although it is actually seems normal, but it is difficult to track which are selected with only the info from new index. It is probably will be more easier for user if they can use original index for the selections.

Thanks in advance.
Arifin

I have similar issues as I try to patch the tabulator with new data. The table index changes after applying filter and tabulator is unable to patch the data, throwing ‘out of bound’ error.