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

Projects
None yet
3 participants
@OvestLabs
Contributor

OvestLabs commented Nov 10, 2018

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

OvestLabs commented Nov 10, 2018

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

@ztplz

This comment has been minimized.

Collaborator

ztplz commented Nov 12, 2018

@OvestLabs You should pull the latest code.

@OvestLabs

This comment has been minimized.

Contributor

OvestLabs commented Nov 12, 2018

@OvestLabs You should pull the latest code.

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

@OvestLabs OvestLabs force-pushed the OvestLabs:initial-sort-order branch from ee7c68f to 9ce68d5 Nov 17, 2018

@codecov

This comment has been minimized.

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

This comment has been minimized.

Contributor

OvestLabs commented Nov 17, 2018

@ztplz I rebased onto master.

@OvestLabs OvestLabs force-pushed the OvestLabs:initial-sort-order branch from 9ce68d5 to 89767f9 Nov 17, 2018

@ztplz

This comment has been minimized.

Collaborator

ztplz commented Nov 17, 2018

@zombieJ zombieJ merged commit 2bf0fad into ant-design:master Nov 20, 2018

18 checks passed

ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 92.28%)
Details
codecov/project 92.28% (+0%) compared to 7180f6b
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment