Skip to content

Conversation

@brichet
Copy link
Member

@brichet brichet commented Feb 6, 2025

Call a 'dispose()' method of the widget when the view is disposed (notebook closed or cell output cleared).

cc. @trungleduc

@brichet
Copy link
Member Author

brichet commented Feb 6, 2025

For the context, it has been discussed at geojupyter/jupytergis#419 (comment)

}

dispose(): void {
this._ywidget?.dispose?.();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be called later, after the this.isDisposed check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I first tried after the this._yModel?.dispose(); but it was never reached in our case (jupytergis). I missed the error below.
I'll check if this is related to jupytergis or yjs_widgets.

@martinRenou martinRenou added the bug Something isn't working label Feb 6, 2025
@trungleduc
Copy link
Member

Thanks!

@trungleduc
Copy link
Member

I don't have the right to merge 😃

@brichet
Copy link
Member Author

brichet commented Feb 6, 2025

I don't have the right to merge 😃

😄 does somebody has this right ??

@trungleduc
Copy link
Member

Copy link
Member

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@davidbrochart davidbrochart merged commit e181feb into QuantStack:main Feb 6, 2025
2 checks passed
@brichet brichet deleted the dispose_widget branch February 6, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants