[Gh #757] setState error when triggering a rerender

Tags: #<Tag:0x00007f136b43dd18> #<Tag:0x00007f136b43db88>

Hi,

I have a react project and whenever I use local state (useState) to cause a re-render (by triggering setValue), I get the following issue. I can’t understand what could be causing this, is this something you’ve come across before?

key: "handsontableAfterViewRender",
    value: function handsontableAfterViewRender() {
      var _this3 = this;
      this.renderersPortalManager.setState({
        portals: _toConsumableArray(this.portalCacheArray)
      }, function () {
        _this3.portalCacheArray = [];
      });
    }

Here is a demo to help show the issue. Try clicking ‘Submit’. It should throw a setState error: https://jsfiddle.net/c0u1oj8r/

Hi @adam2

It seems to be connected with the issues that we have in React wrapper, when two instances of Handsontable are present on the same page. When you have only one instance in the example you sent, the problem is non existent.

Here’s a related issue on GitHub: https://github.com/handsontable/handsontable/issues/7560

OK thanks. Is there a solution/temporary workaround at all?

Unfortunately, we didn’t manage to find any workaround for this. It has to be fixed at the core.