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

nz-table sorts descending by default #3398

Closed
tmccurdy opened this issue May 3, 2019 · 2 comments · Fixed by #3634
Closed

nz-table sorts descending by default #3398

tmccurdy opened this issue May 3, 2019 · 2 comments · Fixed by #3634
Assignees

Comments

@tmccurdy
Copy link

tmccurdy commented May 3, 2019

Reproduction link

https://angular-s4nyi3.stackblitz.io

Steps to reproduce

  • Add nztable and make it sortable
  • Sort an "unsorted" column

What is expected?

Column should sort "ascending" by default when it does not have a sort order already set.
Or (optionally), provide a setting to control the default sort-order direction of the table.

What is actually happening?

Column sorts "descending" by default. No other site or behavior in the world sorts descending first.

Environment Info
ng-zorro-antd 7.3.3
Browser all
@vthinkxie
Copy link
Member

vthinkxie commented Jun 22, 2019

could this demo meet your expect?
https://ng.ant.design/components/table/en#components-table-demo-reset-filter

we will set the default sort to ascend in 8.0.0, thanks for your comment

@vthinkxie vthinkxie mentioned this issue Jun 24, 2019
3 tasks
vthinkxie added a commit that referenced this issue Jun 24, 2019
* fix(module:table): fix table sort default to ascend
close #3398

* fix(module:table): fix virtual scroll no data height
close #3419

* fix(module:table): fix table border error when small or bordered
close #3373 close #3032

* docs(module:table): fix table drag style

* fix(module:collapse): fix expand bug in Safari & animation bug
close #3098 close #3346
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
* fix(module:table): fix table sort default to ascend
close NG-ZORRO#3398

* fix(module:table): fix virtual scroll no data height
close NG-ZORRO#3419

* fix(module:table): fix table border error when small or bordered
close NG-ZORRO#3373 close NG-ZORRO#3032

* docs(module:table): fix table drag style

* fix(module:collapse): fix expand bug in Safari & animation bug
close NG-ZORRO#3098 close NG-ZORRO#3346
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
* fix(module:table): fix table sort default to ascend
close NG-ZORRO#3398

* fix(module:table): fix virtual scroll no data height
close NG-ZORRO#3419

* fix(module:table): fix table border error when small or bordered
close NG-ZORRO#3373 close NG-ZORRO#3032

* docs(module:table): fix table drag style

* fix(module:collapse): fix expand bug in Safari & animation bug
close NG-ZORRO#3098 close NG-ZORRO#3346
@Doc999tor
Copy link

@vthinkxie How can I set default sorting direction on the first click on non-sorted column?
For now it starts to sort from ascending like you changed but can I revert it back and to sort descending by default?

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.

3 participants