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
Table column filter could be ReactNode #14777
Conversation
Deploy preview for ant-design ready! Built with commit bf135c1 |
Please have a review here, @afc163 |
components/table/interface.tsx
Outdated
export type ColumnFilterItem = { text: string; value: string; children?: ColumnFilterItem[] }; | ||
export type CompareFn<T> = (a: T, b: T, sortOrder?: SortOrder) => number; | ||
export type ColumnFilterItem = { | ||
text: string | React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React.ReactNode
contains string
.
components/table/interface.tsx
Outdated
export type ColumnFilterItem = { text: string; value: string; children?: ColumnFilterItem[] }; | ||
export type CompareFn<T> = (a: T, b: T, sortOrder?: SortOrder) => number; | ||
export type ColumnFilterItem = { | ||
text: string | React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just text: React.ReactNode
, React.ReactNode
has already included string
.
sortOrder?: SortOrder; | ||
}, | ||
) => React.ReactNode); | ||
| ((options: { filters: TableStateFilters; sortOrder?: SortOrder }) => React.ReactNode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these style changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's eslint automatically fixed
Codecov Report
@@ Coverage Diff @@
## feature #14777 +/- ##
========================================
Coverage 92.79% 92.79%
========================================
Files 236 236
Lines 6231 6231
Branches 1868 1866 -2
========================================
Hits 5782 5782
- Misses 446 448 +2
+ Partials 3 1 -2
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## feature #14777 +/- ##
========================================
Coverage 92.79% 92.79%
========================================
Files 236 236
Lines 6231 6231
Branches 1868 1866 -2
========================================
Hits 5782 5782
- Misses 446 448 +2
+ Partials 3 1 -2
Continue to review full report at Codecov.
|
First of all, thank you for your contribution! 😄
New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!
[中文版模板 / Chinese template]
This is a ...
What's the background?
API Realization (Optional if not new feature)
What's the effect? (Optional if not new feature)
Changelog description (Optional if not new feature)
Self Check before Merge
Additional Plan? (Optional if not new feature)