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

NzSortFn not work when set nzFrontPagination to false on nzTable component #5457

Closed
Celles opened this issue Jun 19, 2020 · 10 comments · Fixed by #6547
Closed

NzSortFn not work when set nzFrontPagination to false on nzTable component #5457

Celles opened this issue Jun 19, 2020 · 10 comments · Fixed by #6547

Comments

@Celles
Copy link

Celles commented Jun 19, 2020

Reproduction link

https://stackblitz.com/edit/angular-xsdpnt-8q2ppd

Steps to reproduce

The top table is without pagination and click the th which has sort button, nothing happend.
The bottom table's sort works fine with pagination

What is expected?

I want to use sort function on table component without pagination

What is actually happening?

Can't use nzSortFn without front pagination

Environment Info
ng-zorro-antd 9.2.1
Browser Google Chrome 85.0.4175.0
@abhinav82ify
Copy link

I was facing the same problem. This is an issue but there is a workaround to it. The workaround is to only use [nzShowPagination]="false" and skip nzFrontPagination.

https://stackblitz.com/edit/angular-xsdpnt-yavavr

@Celles
Copy link
Author

Celles commented Jul 8, 2020

I was facing the same problem. This is an issue but there is a workaround to it. The workaround is to only use [nzShowPagination]="false" and skip nzFrontPagination.

https://stackblitz.com/edit/angular-xsdpnt-yavavr

Yeah,but your workaround still have a serious problem,your data is still paginated,the table only shows the first 10 data, and i think it is not a good idea to change the pagesize every time you get the data. But it's still a workaround, thanks for your reply

@abhinav82ify
Copy link

abhinav82ify commented Jul 9, 2020

I was facing the same problem. This is an issue but there is a workaround to it. The workaround is to only use [nzShowPagination]="false" and skip nzFrontPagination.
https://stackblitz.com/edit/angular-xsdpnt-yavavr

Yeah,but your workaround still have a serious problem,your data is still paginated,the table only shows the first 10 data, and i think it is not a good idea to change the pagesize every time you get the data. But it's still a workaround, thanks for your reply

Yes, I missed that. There is still a workaround in which you can set the default page size using nzPageSize. You could set the default page size to a very high value. [nzPageSize]="10000"
https://stackblitz.com/edit/angular-xsdpnt-yavavr

@Celles
Copy link
Author

Celles commented Jul 9, 2020

I was facing the same problem. This is an issue but there is a workaround to it. The workaround is to only use [nzShowPagination]="false" and skip nzFrontPagination.
https://stackblitz.com/edit/angular-xsdpnt-yavavr

Yeah,but your workaround still have a serious problem,your data is still paginated,the table only shows the first 10 data, and i think it is not a good idea to change the pagesize every time you get the data. But it's still a workaround, thanks for your reply

Yes, I missed that. There is still a workaround in which you can set the default page size using nzPageSize. You could set the default page size to a very high value. [nzPageSize]="10000"
https://stackblitz.com/edit/angular-xsdpnt-yavavr

Yep,but like i said before, i don't think it's a good way to solve this problem。Hope someone can fix this problem,and again,thanks for your reply

@RuudH
Copy link

RuudH commented Sep 25, 2020

Hi, we are also seeing this issue. Is there any progress on fixing this?

@saurabh47
Copy link

I was facing the same problem. This is an issue but there is a workaround to it. The workaround is to only use [nzShowPagination]="false" and skip nzFrontPagination.
https://stackblitz.com/edit/angular-xsdpnt-yavavr

Yeah,but your workaround still have a serious problem,your data is still paginated,the table only shows the first 10 data, and i think it is not a good idea to change the pagesize every time you get the data. But it's still a workaround, thanks for your reply

Yes, I missed that. There is still a workaround in which you can set the default page size using nzPageSize. You could set the default page size to a very high value. [nzPageSize]="10000"
https://stackblitz.com/edit/angular-xsdpnt-yavavr

In case of [nzShowPagination] = false it only shows 10 rows & [nzScroll] = { y : '200px' } also doesn't works.
It does not shows the scrollbar for more than 10 rows.

@Celles , in case of large number of page size scroll works [nzPageSize]="10000"
Thanks for the workaround

Please fix this issue.

Library Version
ng-zorro-antd ^9.3.0

Thank you so much to all the contributors for such a awesome design system/component library.

@cromat
Copy link

cromat commented Mar 2, 2021

Are there any improvements regarding this issue? It is still there.

@liwei511
Copy link

liwei511 commented Mar 17, 2021

@zorro-bot
Copy link

zorro-bot bot commented Mar 17, 2021

Hello @Celles. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please fill the Pull Request Template here, provide documentation/test cases if needed and make sure CI passed, we will review it soon. Appreciate it advance and we are looking forward to your contribution!

你好 @Celles, 我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献!
giphy

@Eve-Sama
Copy link
Contributor

This bug has been fixed in V11 of Zorro. If you are using V10, you can set nzPageSize to Infinity to skip this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants