Hi,
I am trying to dynamically update the options of NestedSelect
, but seem unable. Here is a code snippet reproducing my problem in a notebook. Any help is greatly appreciated.
import threading
import time
import panel as pn
pn.extension()
select = pn.widgets.NestedSelect(
options={"A": ["0", "1"]},
levels=["A", "B"],
)
def worker():
for i in range(2, 1000):
select.param.update(options={str(j): [str(x) for x in range(j)] for j in range(1, i)})
time.sleep(1)
t = threading.Thread(target=worker)
t.start()
select.servable()
Note how the options remain static.