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): Add defaultFilteredValues to table columns #18925
Conversation
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.
Could you please add tests to make sure this change works as expected?
Deploy preview for ant-design ready! Built with commit ecae5dc |
Codecov Report
@@ Coverage Diff @@
## feature #18925 +/- ##
==========================================
Coverage ? 97.81%
==========================================
Files ? 286
Lines ? 7722
Branches ? 2126
==========================================
Hits ? 7553
Misses ? 169
Partials ? 0
Continue to review full report at Codecov.
|
3706aa6
to
19358d4
Compare
@afc163 Looks like this PR is in limbo, it only lacks chinese translations, any chance to have it reviewed? Thanks! |
is there any new progess for this issue๏ผ |
19358d4
to
055d619
Compare
|
How does it work well with |
055d619
to
081a3cf
Compare
@yoyo837 It is properly overidden by I've updated the tests to better reflect this components/table/tests/Table.filter.test.js |
081a3cf
to
effa545
Compare
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.
LGTM
Please add another case test: |
effa545
to
ecae5dc
Compare
@yoyo837 done |
@mgcrea, could you help to add this feature in |
๐ค This is a ...
๐ Related issue link
We have the ability to se a
defaultSortOrder
to a<Table />
column. Being able to set adefaultFilteredValue
seems to be missing and would be great to easily set defaults without having to maintain a state.In my case, I'm restoring sorters/filters from localStorage.
๐ก Background and solution
Basically cloned the existing codepath for defaultSortOrder to have minimal impact.
๐ Changelog
defaultFilteredValue
as a new column prop to set a default filterdefaultFilteredValue
ไฝไธบๅ็้ป่ฎค็ญ้ๅผPR is missing Chinese translation too as I'm not fluent unfortunately :).
โ๏ธ Self Check before Merge
View rendered components/table/demo/head.md
View rendered components/table/index.en-US.md
View rendered components/table/index.zh-CN.md