mirror of
https://github.com/mathuo/dockview
synced 2025-09-01 15:06:25 +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();
|
gridview.dispose();
|
||||||
|
|
||||||
expect(container.childNodes.length).toBe(0);
|
expect(container.children.length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('#1/VERTICAL', () => {
|
test('#1/VERTICAL', () => {
|
||||||
|
@ -86,6 +86,7 @@ describe('componentPaneview', () => {
|
|||||||
paneview.dispose();
|
paneview.dispose();
|
||||||
|
|
||||||
expect(container.parentElement).toBe(root);
|
expect(container.parentElement).toBe(root);
|
||||||
|
expect(container.children.length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('vertical panels', () => {
|
test('vertical panels', () => {
|
||||||
|
@ -46,6 +46,7 @@ describe('componentSplitview', () => {
|
|||||||
splitview.dispose();
|
splitview.dispose();
|
||||||
|
|
||||||
expect(container.parentElement).toBe(root);
|
expect(container.parentElement).toBe(root);
|
||||||
|
expect(container.children.length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('event leakage', () => {
|
test('event leakage', () => {
|
||||||
|
@ -476,6 +476,8 @@ export class PaneviewComponent extends Resizable implements IPaneviewComponent {
|
|||||||
}
|
}
|
||||||
this._viewDisposables.clear();
|
this._viewDisposables.clear();
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
this.paneview.dispose();
|
this.paneview.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,6 +425,8 @@ export class SplitviewComponent
|
|||||||
view.dispose();
|
view.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user