Skip to content

Commit 0a73deb

Browse files
authored
fix(module:table): should col be wrapped within colgroup in ssr mode (#8948)
1 parent 39c1b3f commit 0a73deb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/table/src/table/table-content.component.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ import { NzTableLayout } from '../table.types';
1515
changeDetection: ChangeDetectionStrategy.OnPush,
1616
encapsulation: ViewEncapsulation.None,
1717
template: `
18-
@for (width of listOfColWidth; track $index) {
19-
<col [style.width]="width" [style.minWidth]="width" />
18+
@if (listOfColWidth.length > 0) {
19+
<colgroup>
20+
@for (width of listOfColWidth; track $index) {
21+
<col [style.width]="width" [style.minWidth]="width" />
22+
}
23+
</colgroup>
2024
}
2125
@if (theadTemplate) {
2226
<thead class="ant-table-thead">

0 commit comments

Comments
 (0)