dockview-react 4.9.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-react
3
- * @version 4.9.0
3
+ * @version 4.10.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -10304,8 +10304,8 @@ class GridviewComponent extends BaseGrid {
10304
10304
  accessor: this,
10305
10305
  isVisible: true,
10306
10306
  });
10307
- this.registerPanel(view);
10308
10307
  this.doAddGroup(view, relativeLocation, options.size);
10308
+ this.registerPanel(view);
10309
10309
  this.doSetGroupActive(view);
10310
10310
  return view;
10311
10311
  }
@@ -11631,6 +11631,10 @@ function useTitle(api) {
11631
11631
  const disposable = api.onDidTitleChange((event) => {
11632
11632
  setTitle(event.title);
11633
11633
  });
11634
+ // Depending on the order in which React effects are run, the title may already be out of sync (cf. issue #1003).
11635
+ if (title !== api.title) {
11636
+ setTitle(api.title);
11637
+ }
11634
11638
  return () => {
11635
11639
  disposable.dispose();
11636
11640
  };