Skip to content

GROUPID_CHANGE firing whenever state changes #38

@benloh

Description

@benloh

Branch: dev-bl/zoombuttons

NetCreate.jsx now uses a tab panel, built with ReactStrap, to allow users to select between a Node Table and an Edge Table.

The tab panel works fine, but when you click on a tab to switch panels, a GROUPID_CHANGE event is fired and we get a warning:

screenshot_330

Tracing the sequence:

  1. When you click on a tab, NetCreate.jsx's toggle() function is called.
  2. ReactStrap's tab panel uses a local state activeTab to keep track of the current tab. So when I click on a tab panel, we do a this.setState({ activeTab: tab }).
  3. Some other stuff happens.
  4. And then at some point, it appears that SessionShell.jsx's render() is being called, triggering the GROUPID_CHANGE AppCall.

If I remove the setState call in the toggle() method, the GROUPID_CHANGE is not triggered.

It's possible that Bootstrap updates the URL when changing tabs, and that's triggering the SessionShell call?
https://reactstrap.github.io/components/tabs/

But that's probably not the culprit, because there are other setState calls in NetCreate.jsx and whenever setState is called, the GROUPID_CHANGE is triggered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions