feat: Table column support sortIcon #1990
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
中文模板 / Chinese Template
What kind of change does this PR introduce? (check at least one)
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 参数控制。
使用示例: https://codesandbox.io/p/sandbox/table-sorticon-zvpn2n
Changelog
🇨🇳 Chinese
🇺🇸 English
Checklist
Other
Additional information