After first interaction with an interactive Pyvista Trame plot, Jupyterlab hangs . The kernel status stays ‘busy’.
In the examle below, I tried to choose the plot with ipywidget checkboxes. After running the cell, the the saddle is shown in a trame plot. But after the first click to the ‘red’ checkbox the notebook freezes.
Did I miss something?
import ipywidgets as widgets
import pyvista as pv
pv.set_jupyter_backend('trame')
dataset = pv.examples.download_saddle_surface()
red_check_box = widgets.Checkbox(False, description="red")
green_check_box = widgets.Checkbox(False, description="green")
ui = widgets.HBox([red_check_box, green_check_box])
def draw_saddle(red, green):
    print(f"{red=}, {green=}")
    if red:
        dataset.plot(color='red')  # plot() returns Plotter.show()
    elif green:
        dataset.plot(color='green')
    else:
        dataset.plot(color='grey')
out = widgets.interactive_output(
    draw_saddle,
    {
        'red': red_check_box,
        'green': green_check_box
    },
)
display(ui, out)
Jupyterlab Version 4.4.4
pyvista version ‘0.45.2’
ipywidgets 5.0.15