This repository was archived by the owner on Oct 26, 2019. It is now read-only.
This repository was archived by the owner on Oct 26, 2019. It is now read-only.
widget don't display after an event (Could not create view Error) #188
Open
Description
I have a notebook (snippet below) which has an ipywidget button. I need to display a checkbox on click of the button. This works as expected in jupyter. When this notebook is deployed to a dashboard server, on click of button, checkbox is not displayed.
notebook:
from ipywidgets import *
from IPython.display import display
def show_widgets():
c = widgets.Checkbox(
description='check me',
value=True,
)
display(c)
button = widgets.Button(
description='Display checkbox'
)
display(button)
def on_button_clicked(b):
show_widgets()
button.on_click(on_button_clicked)
JS Console error:
Error: Could not create view at new Error (native) at Error.WrappedError (http://...:3000/components/jupyter-js-widgets.js:4065:22) at promiseRejection (http://...:3000/components/jupyter-js-widgets.js:4156:30)