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

feat: Table column support sortIcon #1990

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Conversation

shijiatongxue
Copy link
Collaborator

@shijiatongxue shijiatongxue commented Dec 22, 2023

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Feature

PR description

feat: Table column support sortIcon

decsription:返回一个 react ndoe 而不是 up icon 和 down icon 的原因,默认的 icon 整体实现和一般 icon 不同,up 和 down 实际上是重叠的。如果自定义返回两个 icon,大概率不会是这样的样式。因此采用返回一个 react node 控制 sort icon,包含升序和降序,icon 的高亮行为通过 props.sortOrder 参数控制。

image

image

使用示例: https://codesandbox.io/p/sandbox/table-sorticon-zvpn2n

image

Changelog

🇨🇳 Chinese

  • Feat: Table 列支持自定义排序 icon

🇺🇸 English

  • Feat: Table column support sortIcon

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0577fcf:

Sandbox Source
pr-story Configuration
Semi Design: Simple Story Configuration

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (aa959f0) 88.12% compared to head (a64388a) 88.16%.

❗ Current head a64388a differs from pull request most recent head 0577fcf. Consider uploading reports for the commit 0577fcf to get more accurate results

Files Patch % Lines
packages/semi-ui/table/ColumnSorter.tsx 80.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           release    #1990      +/-   ##
===========================================
+ Coverage    88.12%   88.16%   +0.04%     
===========================================
  Files          436      436              
  Lines        25590    25594       +4     
  Branches      6459     6460       +1     
===========================================
+ Hits         22550    22566      +16     
+ Misses        3040     3028      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Dec 22, 2023

Passing run #2130 ↗︎

0 234 10 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 0577fcf into aa959f0...
Project: semi-design Commit: a64388a0ef ℹ️
Status: Passed Duration: 09:43 💡
Started: Dec 22, 2023 9:02 AM Ended: Dec 22, 2023 9:12 AM

Review all test suite changes for PR #1990 ↗︎

@shijiatongxue shijiatongxue merged commit 8507e4b into release Dec 25, 2023
10 checks passed
@shijiatongxue shijiatongxue deleted the feat/table-sorterIcon branch December 25, 2023 06:50
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.

7 participants