Skip to content

SplitviewReact and GridviewReact encounter error invalid operation: resource is already disposed #889

@mickey-barron

Description

@mickey-barron

Describe the bug
When trying to use SplitviewReact or GridviewReact, any time api.addPanel is called during the onReady function, the following error is thrown: invalid operation: resource is already disposed. This only happens on SplitviewReact and GridviewReact, not DockviewReact nor PaneviewReact.

If the api is stored as a state and then called from a useEffect hook, it works as expected.

To Reproduce
This error is observed in the Splitview and Gridview examples.

Steps to reproduce the behavior:

  1. Open either of the examples and run the Code Sandbox
  2. Observe the error

Expected behavior
No error is thrown when calling the addPanel method from the onReady function.

Desktop (please complete the following information):

  • Browser FireFox
  • Version v4.2.1

Additional context
I implemented the useEffect work around on a Splitview Code Sandbox example, available here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions