mirror of
https://github.com/mathuo/dockview
synced 2025-11-12 10:02:05 +00:00
Merge pull request #1015 from yo35/fix-issue-1003-title-out-of-sync
fix: title possibly out of sync in DockviewDefaultTab (#1003)
This commit is contained in:
commit
a7bef6db80
@ -10,6 +10,11 @@ function useTitle(api: DockviewPanelApi): string | undefined {
|
||||
setTitle(event.title);
|
||||
});
|
||||
|
||||
// Depending on the order in which React effects are run, the title may already be out of sync (cf. issue #1003).
|
||||
if (title !== api.title) {
|
||||
setTitle(api.title);
|
||||
}
|
||||
|
||||
return () => {
|
||||
disposable.dispose();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user