Hello all,
First, thanks for creating Holoviz!
Desired:
I want to change a Tabulator value, when it is not visible.
When visible switched on, i would like to see the new Tabulator value.
Actual:
Tabulator value changes, when visible switched on, Tabulator content is not showed up.
Actions to reproduce:
- Click Show/Hide button.
- Click Change Value button.
- Click Show/Hide button again.
Code snippet to reproduce:
import sys
import panel as pn
import pandas as pd
tab = pn.widgets.Tabulator(pd.DataFrame(columns=[‘x’], data=[1, 2, 3], index=[0, 1, 2]))
def btn1_event(e):
tab.value = pd.DataFrame(columns=[‘x’], data=[3, 4], index=[0, 1])
print(f’\nChanged value to\n{tab.value}')
btn1 = pn.widgets.Button(name=‘Change Value’, on_click=btn1_event)
def btn2_event(e):
val = not bool(e.cls.clicks % 2)
tab.visible = val
print(f’\nJust changed visibility to {val}\ntab value is \n{tab.value}')
btn2 = pn.widgets.Button(name=‘Show/Hide’, on_click=btn2_event)
terminal = pn.widgets.Terminal()
sys.stdout = terminal
pn.Row(tab, btn1, btn2, terminal).show()
Panel Version
1.3.1
Output:
Any Ideas ?
Thanks.