Closed chester0424 closed 4 months ago
1.7.1.0
17.3.0
https://[github.com](https://github.com/DevCloudFE/ng-devui)/DevCloudFE/ng-devui/devui/data-table/table/head/th/th.component.ts
devui/data-table/table/head/th/th.component.ts 中 onMousedown和onMouseup成对方法, onMousedown 方法添加resize-overlay元素代码: this.renderer2.appendChild(this.element.firstElementChild, this.resizeOverlay); 而在 onMouseup方法中删除元素diamante: this.renderer2.removeChild(this.element, this.resizeOverlay);
导致运行时报错 ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
No response
修改成: this.renderer2.removeChild(this.element.firstElementChild, this.resizeOverlay); 就正常了
感谢贡献 #353
Version
1.7.1.0
Angular Version
17.3.0
Link to minimal reproduction
https://[github.com](https://github.com/DevCloudFE/ng-devui)/DevCloudFE/ng-devui/devui/data-table/table/head/th/th.component.ts
Step to reproduce
devui/data-table/table/head/th/th.component.ts 中 onMousedown和onMouseup成对方法, onMousedown 方法添加resize-overlay元素代码: this.renderer2.appendChild(this.element.firstElementChild, this.resizeOverlay); 而在 onMouseup方法中删除元素diamante: this.renderer2.removeChild(this.element, this.resizeOverlay);
导致运行时报错 ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
What is expected
No response
What is actually happening
No response
Any additional comments (optional)
修改成: this.renderer2.removeChild(this.element.firstElementChild, this.resizeOverlay); 就正常了