Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output with traitlets class only update once in jupyterlab #3890

Open
CnBDM-Su opened this issue Feb 22, 2024 · 0 comments
Open

Output with traitlets class only update once in jupyterlab #3890

CnBDM-Su opened this issue Feb 22, 2024 · 0 comments
Labels
Custom Widget Issues related to using ipywidgets as a framework for custom widgets

Comments

@CnBDM-Su
Copy link

CnBDM-Su commented Feb 22, 2024

What I am doing is like this, I want to display the data where I select.
image

The selected data is oberved and stored in a traitlets class well. However, it cannot display well in widgets.Output()

@data_output.capture()
def show_dataframe(change):
if change is not None:
tmp_frame = data_frame.iloc[change['new']][:10]
clear_output()
display(tmp_frame, display_id=99)
js2py_memory.observe(show_dataframe, names=["data"])

If I display the result in a new cell instead of in widgets.Output(), it works well.
image

Is there any way I can put the result in Output? Because I want to put both table and plot in single cell. If Output cannot realize this, is there other way?

Thanks

@CnBDM-Su CnBDM-Su added the Custom Widget Issues related to using ipywidgets as a framework for custom widgets label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Custom Widget Issues related to using ipywidgets as a framework for custom widgets
Projects
None yet
Development

No branches or pull requests

1 participant