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

Add sortColumn to title render #19008

Closed
wants to merge 24 commits into from
Closed

Add sortColumn to title render #19008

wants to merge 24 commits into from

Conversation

swillis12
Copy link
Contributor

@swillis12 swillis12 commented Sep 25, 2019

Fixes #19007

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#19007

Title render function is missing information about exactly which column is currently sorted. This is limiting when trying to render a custom sorter.

💡 Background and solution

Solution is to send the sortColumn that is stored in the table state. This way the user can infer which column is currently sorted while implementing the title render function.

📝 Changelog

Title render function argument object now contains a new key, sortColumn.

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/table/index.en-US.md
View rendered components/table/index.zh-CN.md

@netlify
Copy link

netlify bot commented Sep 25, 2019

Deploy preview for ant-design ready!

Built with commit 454153c

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

@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #19008 into feature will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #19008      +/-   ##
===========================================
- Coverage    96.96%   96.92%   -0.04%     
===========================================
  Files          281      281              
  Lines         7601     7555      -46     
  Branches      2136     2109      -27     
===========================================
- Hits          7370     7323      -47     
- Misses         229      230       +1     
  Partials         2        2
Impacted Files Coverage Δ
components/select/index.tsx 96.87% <ø> (-0.1%) ⬇️
components/table/Table.tsx 95.39% <100%> (ø) ⬆️
components/tree/Tree.tsx 96.87% <100%> (ø) ⬆️
components/tree-select/index.tsx 95.83% <100%> (ø) ⬆️
components/upload/UploadList.tsx 96.55% <0%> (-1.47%) ⬇️
components/message/index.tsx 93.84% <0%> (-0.44%) ⬇️
components/anchor/Anchor.tsx 94.4% <0%> (-0.22%) ⬇️
components/input/Search.tsx 100% <0%> (ø) ⬆️
components/grid/row.tsx 100% <0%> (ø) ⬆️
... and 4 more

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 53b3c5a...454153c. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Sep 26, 2019

feature branch please~

@swillis12 swillis12 changed the base branch from master to feature September 26, 2019 03:41
@swillis12
Copy link
Contributor Author

feature branch please~

@afc163 I changed the base branch to feature, let me know if I need to do anything else on my end.

@afc163
Copy link
Member

afc163 commented Sep 26, 2019

You need to checkout from feature then send PR to it.

@swillis12
Copy link
Contributor Author

I have done this incorrectly, let me open a new PR

@swillis12 swillis12 closed this Sep 26, 2019
@swillis12 swillis12 deleted the issues/19007 branch September 26, 2019 03:53
@swillis12
Copy link
Contributor Author

New PR on feature branch here: #19012

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

7 participants