Skip to content

Commit

Permalink
fix(module:table): should col be wrapped within colgroup in ssr mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Laffery authored Dec 20, 2024
1 parent 39c1b3f commit 0a73deb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/table/src/table/table-content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ import { NzTableLayout } from '../table.types';
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
@for (width of listOfColWidth; track $index) {
<col [style.width]="width" [style.minWidth]="width" />
@if (listOfColWidth.length > 0) {
<colgroup>
@for (width of listOfColWidth; track $index) {
<col [style.width]="width" [style.minWidth]="width" />
}
</colgroup>
}
@if (theadTemplate) {
<thead class="ant-table-thead">
Expand Down

0 comments on commit 0a73deb

Please sign in to comment.