Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:table): fix table fixed style when nzData change #4274

Merged
merged 1 commit into from
Oct 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/table/nz-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ export class NzTableComponent<T = any> implements OnInit, AfterViewInit, OnDestr

@Input() nzItemRender: TemplateRef<PaginationItemRenderContext>;
@ViewChild('renderItemTemplate', { static: true }) itemRenderChild: TemplateRef<PaginationItemRenderContext>;

get itemRender(): TemplateRef<PaginationItemRenderContext> {
return this.nzItemRender || this.itemRenderChild;
}

@Input() @InputBoolean() nzFrontPagination = true;
@Input() @InputBoolean() nzTemplateMode = false;
@Input() @WithConfig(false) @InputBoolean() nzBordered: boolean;
Expand Down Expand Up @@ -269,6 +271,11 @@ export class NzTableComponent<T = any> implements OnInit, AfterViewInit, OnDestr
this.fitScrollBar();
this.setScrollPositionClassName();
}
if (changes.nzData) {
if (this.platform.isBrowser) {
setTimeout(() => this.setScrollPositionClassName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the table for me for some reason:
image

8.3.0:
image

}
}
if (changes.nzPageIndex || changes.nzPageSize || changes.nzFrontPagination || changes.nzData) {
this.updateFrontPaginationDataIfNeeded(!!(changes.nzPageSize || changes.nzData));
}
Expand Down