Skip to content

Commit

Permalink
fix(module:table): support nzWidthConfig null undefined value (NG-ZOR…
Browse files Browse the repository at this point in the history
  • Loading branch information
vthinkxie authored and Ricbet committed Apr 9, 2020
1 parent cb5639d commit 6e5b297
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/table/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The data passed to `[nzData]` will be export with [Template Context](https://ang
| `[nzShowPagination]` | Whether show pagination component in bottom of the table | `boolean` | `true` |
| `[nzPaginationPosition]` | Specify the position of Pagination | `'top' \| 'bottom' \| 'both'` | `bottom` |
| `[nzBordered]` | Whether to show all table borders | `boolean` | `false` ||
| `[nzWidthConfig]` | Set col width can not used with `nzWidth` of `th` | `string[]` | - |
| `[nzWidthConfig]` | Set col width can not used with `nzWidth` of `th` | `string[]` | `[]` |
| `[nzSize]` | Size of table | `'middle' \| 'small' \| 'default'` | `'default'` ||
| `[nzLoading]` | Loading status of table | `boolean` | `false` |
| `[nzLoadingIndicator]` | the spinning indicator | `TemplateRef<void>` | - |
Expand Down
2 changes: 1 addition & 1 deletion components/table/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Table 组件同时具备了易用性和高度可定制性
| `[nzShowPagination]` | 是否显示分页器 | `boolean` | `true` |
| `[nzPaginationPosition]` | 指定分页显示的位置 | `'top' \| 'bottom' \| 'both'` | `bottom` |
| `[nzBordered]` | 是否展示外边框和列边框 | `boolean` | `false` ||
| `[nzWidthConfig]` | 表头分组时指定每列宽度,与 `th``nzWidth` 不可混用 | `string[]` | - |
| `[nzWidthConfig]` | 表头分组时指定每列宽度,与 `th``nzWidth` 不可混用 | `string[]` | `[]` |
| `[nzSize]` | 正常或迷你类型 | `'middle' \| 'small' \| 'default'` | `'default'` ||
| `[nzLoading]` | 页面是否加载中 | `boolean` | `false` |
| `[nzLoadingIndicator]` | 加载指示符 | `TemplateRef<void>` | - |
Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ng-template #colGroupTemplate>
<colgroup>
<col [style.width]="width" [style.minWidth]="width" *ngFor="let width of nzWidthConfig">
<ng-container *ngIf="!nzWidthConfig.length">
<ng-container *ngIf="(nzWidthConfig && !nzWidthConfig.length) || !nzWidthConfig">
<col [style.width]="th.nzWidth" [style.minWidth]="th.nzWidth" *ngFor="let th of listOfNzThComponent">
</ng-container>
</colgroup>
Expand Down

0 comments on commit 6e5b297

Please sign in to comment.