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:
- Open either of the examples and run the Code Sandbox
- 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.
Describe the bug
When trying to use
SplitviewReactorGridviewReact, any timeapi.addPanelis called during theonReadyfunction, the following error is thrown:invalid operation: resource is already disposed. This only happens onSplitviewReactandGridviewReact, notDockviewReactnorPaneviewReact.If the api is stored as a state and then called from a
useEffecthook, it works as expected.To Reproduce
This error is observed in the
SplitviewandGridviewexamples.Steps to reproduce the behavior:
Expected behavior
No error is thrown when calling the
addPanelmethod from theonReadyfunction.Desktop (please complete the following information):
Additional context
I implemented the
useEffectwork around on a Splitview Code Sandbox example, available here.