tegel
tegel copied to clipboard
[Bug report]: tds-table, console error on rerender
Requirements before reporting
- [X] No duplicated issue reported.
- [X] I have checked the latest version if the bug exist there. See all available packages at npmJS.com
- [X] I have followed the installation guide.
Package versions
@scania/tegel-angular: "^1.6.0"
Browser
Chrome
Framework
Angular
Version
Angular 17
Reproduction steps
- Add component tds-table
- Table renders ok without error.
- Table rerenders the error is logged, ...
Code example
....
Screenshots
Expected behaviour
Validate that the header is found before getting the children.
componentWillRender() { const headerColumnsNo = this.host.parentElement.querySelector('tds-table-header').children.length; // multiselect and expended features requires one extra column for controls... if (this.multiselect || this.expandableRows) { this.columnsNumber = headerColumnsNo + 1; } else { this.columnsNumber = headerColumnsNo; } }