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

Starting sort order with 'ascend', then 'descend', then undefined. #13069

Merged
merged 1 commit into from Nov 20, 2018

Conversation

OvestLabs
Copy link
Contributor

When using a Table component, the sort order is always jumping to descending on the first click. This pull request modifies this to ensure the first click is ascending.

Column 1st click: undefined => 'ascend'
Column 2nd click: 'ascend' => 'descend'
Column 3rd click: 'descend' => undefined
...

I have never seen table sorting that starts with descending order. So, it's fair to claim this as a standard (none => ascend => descend => none)

Note: lint was broken on master. You will find several let => const changes to appease the hook.

@netlify
Copy link

netlify bot commented Nov 10, 2018

Deploy preview for ant-design ready!

Built with commit 89767f9

https://deploy-preview-13069--ant-design.netlify.com

@OvestLabs
Copy link
Contributor Author

Lint was already broken on files I didn't touch.

@ztplz
Copy link
Contributor

ztplz commented Nov 12, 2018

@OvestLabs You should pull the latest code.

@OvestLabs
Copy link
Contributor Author

@OvestLabs You should pull the latest code.

I already have the latest code... as of this message.

@codecov
Copy link

codecov bot commented Nov 17, 2018

Codecov Report

Merging #13069 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13069   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         212      212           
  Lines        5641     5641           
  Branches     1632     1632           
=======================================
  Hits         5206     5206           
- Misses        428      430    +2     
+ Partials        7        5    -2
Impacted Files Coverage Δ
components/table/Table.tsx 94.21% <100%> (ø) ⬆️
components/transfer/index.tsx 87.91% <0%> (ø) ⬆️
components/time-picker/index.tsx 81.96% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7180f6b...89767f9. Read the comment docs.

@OvestLabs
Copy link
Contributor Author

@ztplz I rebased onto master.

@ztplz
Copy link
Contributor

ztplz commented Nov 17, 2018

@afc163

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

Successfully merging this pull request may close these issues.

None yet

3 participants