Skip to content

Commit

Permalink
feat(module:table): support nzLoadingIndicator (#3299)
Browse files Browse the repository at this point in the history
close #3008
  • Loading branch information
vthinkxie authored Apr 18, 2019
1 parent 480e216 commit 1f339b3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/spin/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ When part of the page is waiting for asynchronous data or during a rendering pro
| Property | Description | Type | Default Value |
| -------- | ----------- | ---- | ------------- |
| `[nzDelay]` | specifies a delay in milliseconds for loading state (prevent flush), unit: milliseconds | `number` | - |
| `[nzIndicator]` | React node of the spinning indicator | `TemplateRef<void>` | - |
| `[nzIndicator]` | the spinning indicator | `TemplateRef<void>` | - |
| `[nzSize]` | size of Spin | `'large'|'small'|'default'` | `'default'` |
| `[nzSpinning]` | whether Spin is spinning | `boolean` | `true` |
| `[nzSimple]` | whether Spin has no children | `boolean` | `false` |
Expand Down
1 change: 1 addition & 0 deletions components/table/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The data passed to `[nzData]` will be export with [Template Context](https://ang
| `[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>` | - |
| `[nzLoadingDelay]` | Specifies a delay in milliseconds for loading state (prevent flush) | `number` | `0` |
| `[nzScroll]` | Whether table can be scrolled in x/y direction, `x` or `y` can be a string that indicates the width and height of table body | `object` | - |
| `[nzTitle]` | Table title renderer | `string|TemplateRef<void>` | - |
Expand Down
1 change: 1 addition & 0 deletions components/table/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Table 组件同时具备了易用性和高度可定制性
| `[nzWidthConfig]` | 表头分组时指定每列宽度,与 `th``nzWidth` 不可混用 | `string[]` | - |
| `[nzSize]` | 正常或迷你类型 | `'middle'|'small'|'default'` | `'default'` |
| `[nzLoading]` | 页面是否加载中 | `boolean` | `false` |
| `[nzLoadingIndicator]` | 加载指示符 | `TemplateRef<void>` | - |
| `[nzLoadingDelay]` | 延迟显示加载效果的时间(防止闪烁) | `number` | `0` |
| `[nzScroll]` | 横向或纵向支持滚动,也可用于指定滚动区域的宽高度:`{ x: "300px", y: "300px" }` | `object` | - |
| `[nzTitle]` | 表格标题 | `string|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 @@ -79,7 +79,7 @@
(nzPageIndexChange)="emitPageSizeOrIndex(nzPageSize,$event)">
</nz-pagination>
</ng-template>
<nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading">
<nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading" [nzIndicator]="nzLoadingIndicator">
<ng-container *ngIf="nzPaginationPosition === 'both' || nzPaginationPosition === 'top'">
<ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
</ng-container>
Expand Down
1 change: 1 addition & 0 deletions components/table/nz-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class NzTableComponent<T = any> implements OnInit, AfterViewInit, OnDestr
@Input() @InputNumber() nzVirtualMaxBufferPx = 200;
@Input() @InputNumber() nzVirtualMinBufferPx = 100;
@Input() nzLoadingDelay = 0;
@Input() nzLoadingIndicator: TemplateRef<void>;
@Input() nzTotal = 0;
@Input() nzTitle: string | TemplateRef<void>;
@Input() nzFooter: string | TemplateRef<void>;
Expand Down

0 comments on commit 1f339b3

Please sign in to comment.