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

Fixed an issue with throwing an exception when HotTable component state is changed #10427

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

wszymanski
Copy link
Contributor

Context

It seems that render done by Formulas plugin while component state is changed causes an error. When we have an application which shows two or HotTable each of them resets some internal properties (done by methods attached to ref attributes - see below).

<div ref={this.setHotElementRef.bind(this)} {...containerProps}>

<RenderersPortalManager ref={this.setRenderersPortalManagerRef.bind(this)} />

Any extra call of Hansontable's render method cause access to nulled values. Thus, an exception in thrown. This PR stops renderers actions from execution while component isn't mounted.

How has this been tested?

Wrote application which use two instances of HotTable component

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. https://github.com/handsontable/dev-handsontable/issues/1334

Affected project(s):

  • handsontable
  • @handsontable/angular
  • @handsontable/react
  • @handsontable/vue
  • @handsontable/vue3

Checklist:

  • I have reviewed the guidelines about Contributing to Handsontable and I confirm that my code follows the code style of this project.
  • My change requires a change to the documentation.

@wszymanski wszymanski added bug React Issues regarding the @handsontable/react wrapper. labels Jun 27, 2023
@wszymanski wszymanski self-assigned this Jun 27, 2023
@github-actions
Copy link

Launch the local version of documentation by running:

npm run docs:review 74aa42e0c32351fcc4cf24e790c8bfdbf96031a3

@wszymanski
Copy link
Contributor Author

There is one not passing tests which can't be reproduced by me on local environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug React Issues regarding the @handsontable/react wrapper.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant