Skip to content

Commit

Permalink
feat(abc:st): add expandIcon property (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
devcui committed Aug 20, 2024
1 parent 67ed7f2 commit d7ba151
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/abc/st/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ When an exception is thrown when parsing column data, *INVALID DATA* will be for
| `[expandRowByClick]` | Whether to expand row by clicking anywhere in the whole row | `boolean` | `false` ||
| `[expandAccordion]` | Accordion mode | `boolean` | `false` ||
| `[expand]` | Whether current column include expand icon | `TemplateRef<void>` | - | - |
| `[expandIcon]` | Custom expand icon | `TemplateRef<void>` | - |
| `[responsive]` | Whether to turn on responsive | `boolean` | `true` ||
| `[responsiveHideHeaderFooter]` | Whether to display the header and footer under the small screen | `boolean` | `false` ||
| `[resizable]` | Resize header of the current table, **Multiple headers not supported** | `STResizable, boolean` | - | - |
Expand Down
1 change: 1 addition & 0 deletions packages/abc/st/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module: import { STModule } from '@yelon/abc/st';
| `[expandRowByClick]` | 通过点击行来展开子行 | `boolean` | `false` ||
| `[expandAccordion]` | 手风琴模式 | `boolean` | `false` ||
| `[expand]` | 当前列是否包含展开按钮,当数据源中包括 `expand` 表示展开状态 | `TemplateRef<void>` | - | - |
| `[expandIcon]` | 自定义展开图标 | `TemplateRef<void>` | - |
| `[responsive]` | 是否开启响应式 | `boolean` | `true` ||
| `[responsiveHideHeaderFooter]` | 是否在小屏幕下才显示顶部与底部 | `boolean` | `false` ||
| `[resizable]` | 当前表格所有列的调整表头配置项,**不支持多表头** | `STResizable, boolean` | - | - |
Expand Down
1 change: 1 addition & 0 deletions packages/abc/st/st.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
<td
[nzShowExpand]="expand && i.showExpand !== false"
[nzExpand]="i.expand"
[nzExpandIcon]="expandIcon"
(nzExpandChange)="_expandChange(i, $event)"
(click)="_stopPropagation($event)"
nzWidth="50px"
Expand Down
2 changes: 1 addition & 1 deletion packages/abc/st/st.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export class STComponent implements AfterViewInit, OnChanges {
@Input({ transform: booleanAttribute }) expandRowByClick = false;
@Input({ transform: booleanAttribute }) expandAccordion = false;
@Input() expand: TemplateRef<{ $implicit: NzSafeAny; index: number }> | null = null;
@Input() expandIcon: TemplateRef<void> | null = null;
@Input() noResult?: string | TemplateRef<void> | null;
@Input({ transform: booleanAttribute }) responsive: boolean = true;
@Input({ transform: booleanAttribute }) responsiveHideHeaderFooter?: boolean;
Expand Down Expand Up @@ -384,7 +385,6 @@ export class STComponent implements AfterViewInit, OnChanges {
this._data = result.list ?? [];
this._statistical = result.statistical as STStatisticalResults;
// Should be re-render in next tike when using virtual scroll
// https://github.com/hbyunzai/ng-yunzai/issues/1836
if (this.cdkVirtualScrollViewport != null) {
Promise.resolve().then(() => this.cdkVirtualScrollViewport?.checkViewportSize());
}
Expand Down

0 comments on commit d7ba151

Please sign in to comment.