I’m using the following snippet to clear the tabs when a button was clicked more than once (before appending the new results again)
def click_for_data(event):
if button.clicks > 1:
object.tabs.clear()
...
But I’m getting errors and the tabs aren’t clearing. Is this a known issue? any workaround?
Errors for reference:
Traceback (most recent call last):
File "/Users/name/anaconda3/lib/python3.7/site-packages/pyviz_comms/__init__.py", line 338, in _handle_msg
self._on_msg(msg)
File "/Users/name/anaconda3/lib/python3.7/site-packages/panel/layout.py", line 672, in _comm_change
inds = [tabs[tref] for tref in tab_refs]
File "/Users/name/anaconda3/lib/python3.7/site-packages/panel/layout.py", line 672, in <listcomp>
inds = [tabs[tref] for tref in tab_refs]
I tried clearing the object list manually (despite the recommendation not to do so) and got similar errors.
Thanks!
Noa