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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add sortColumn to title render #19012

Merged
merged 2 commits into from Sep 26, 2019
Merged

feat: Add sortColumn to title render #19012

merged 2 commits into from Sep 26, 2019

Conversation

swillis12
Copy link
Contributor

@swillis12 swillis12 commented Sep 26, 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

Update docs

Update TS interface

Add null

Fix lint error
@netlify
Copy link

netlify bot commented Sep 26, 2019

Deploy preview for ant-design ready!

Built with commit 7053162

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

@codecov
Copy link

codecov bot commented Sep 26, 2019

Codecov Report

Merging #19012 into feature will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #19012      +/-   ##
===========================================
- Coverage    96.96%   96.96%   -0.01%     
===========================================
  Files          281      281              
  Lines         7609     7601       -8     
  Branches      2094     2136      +42     
===========================================
- Hits          7378     7370       -8     
  Misses         229      229              
  Partials         2        2
Impacted Files Coverage 螖
components/table/Table.tsx 95.39% <100%> (-0.07%) 猬囷笍

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 90a77c0...7053162. Read the comment docs.

@afc163
Copy link
Member

afc163 commented Sep 26, 2019

conflict

@afc163 afc163 changed the title Add sortColumn to title render feat: Add sortColumn to title render Sep 26, 2019
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

2 participants