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

Destroying Handsontable instances bound to the wrappers make them throw errors and crash. #8311

Closed
jansiegel opened this issue Jun 25, 2021 · 2 comments · Fixed by #8313
Closed
Assignees
Labels
Angular Issues regarding the @handsontable/angular wrapper. React Issues regarding the @handsontable/react wrapper. Status: Released Vue Issues regarding the @handsontable/vue wrapper.

Comments

@jansiegel
Copy link
Member

Description

Issue based on the discussion in #8165.

Currently, destroying the Handsontable instance bound to the wrappers leaves behind the unusable wrappers, causes memory leaks, and throws errors.
Wrappers should display an appropriate warning when they recognize the HOT instance was destroyed, and stop calling the HOT instance's API.

Steps to reproduce

  1. Destroy the HOT instance in bound to the wrapper.
  2. Try to do some operations on the wrapper.

Demo

https://jsfiddle.net/js_ziggle/yr6g2eb7/

@jansiegel jansiegel added React Issues regarding the @handsontable/react wrapper. Vue Issues regarding the @handsontable/vue wrapper. Angular Issues regarding the @handsontable/angular wrapper. labels Jun 25, 2021
@jansiegel jansiegel self-assigned this Jun 25, 2021
jansiegel added a commit that referenced this issue Jun 25, 2021
… make them display a warning if the underlying Handsontable instance has been destroyed. #8311
@jansiegel jansiegel changed the title Prevent errors when destroying the underlying Handsontable instance of the wrappers. Destroying Handsontable instances bound to the wrappers make them throw errors and crash. Jun 25, 2021
jansiegel added a commit that referenced this issue Jul 1, 2021
…f the wrappers. (#8313)

* Add a 'isDestroyed' check for Handsontable in all of the wrappers and make them display a warning if the underlying Handsontable instance has been destroyed. #8311

* Split the changelog file into 3 separate framework-based ones. #8311
@aninde
Copy link
Contributor

aninde commented Jul 22, 2021

This issue will be fixed by v9.0.2 https://jsfiddle.net/476wnt9m/.

Very good idea with adding a warning to the console: The Handsontable instance bound to this component was destroyed and cannot be used properly.

@mrpiotr-dev
Copy link
Contributor

Hi @henricook,
I'm happy to announce we just released v9.0.2 with the fix to this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Angular Issues regarding the @handsontable/angular wrapper. React Issues regarding the @handsontable/react wrapper. Status: Released Vue Issues regarding the @handsontable/vue wrapper.
Projects
None yet
4 participants