mirror of
https://github.com/mathuo/dockview
synced 2025-08-27 20:46:46 +00:00
Merge pull request #870 from mathuo/866-splitviewreact-rendered-twice-in-react-strict-mode
bug: remove element after dispose
This commit is contained in:
commit
082b811d20
@ -524,7 +524,7 @@ describe('gridview', () => {
|
||||
|
||||
gridview.dispose();
|
||||
|
||||
expect(container.childNodes.length).toBe(0);
|
||||
expect(container.children.length).toBe(0);
|
||||
});
|
||||
|
||||
test('#1/VERTICAL', () => {
|
||||
|
@ -86,6 +86,7 @@ describe('componentPaneview', () => {
|
||||
paneview.dispose();
|
||||
|
||||
expect(container.parentElement).toBe(root);
|
||||
expect(container.children.length).toBe(0);
|
||||
});
|
||||
|
||||
test('vertical panels', () => {
|
||||
|
@ -46,6 +46,7 @@ describe('componentSplitview', () => {
|
||||
splitview.dispose();
|
||||
|
||||
expect(container.parentElement).toBe(root);
|
||||
expect(container.children.length).toBe(0);
|
||||
});
|
||||
|
||||
test('event leakage', () => {
|
||||
|
@ -476,6 +476,8 @@ export class PaneviewComponent extends Resizable implements IPaneviewComponent {
|
||||
}
|
||||
this._viewDisposables.clear();
|
||||
|
||||
this.element.remove();
|
||||
|
||||
this.paneview.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -425,6 +425,8 @@ export class SplitviewComponent
|
||||
view.dispose();
|
||||
}
|
||||
|
||||
this.element.remove();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user