-
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not let the React dialogs dispose on close
To workaround the React-based widget lifecycle issue: eclipse-theia/theia#12093. The dialog constructor is called once, hence the default `toDispose` listener will execute only once per app lifecycle. The default dialog close behavior (from Theia) will dispose the widget. On dialog reopen, the constructor won't be called again, as the dialog is injected as a singleton, but the React component has been unmounted on dialog dispose. Hence, they will be recreated. The `componentDidMount` method will be called, but the `componentWillUnmount` is not called anymore. The dialog is already disposed. It leads to a resource leak. Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
- Loading branch information
Akos Kitta
committed
Aug 3, 2023
1 parent
cf3a07f
commit 610e464
Showing
1 changed file
with
18 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters