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: enable setting custom column order by visibleColumns #1739
feat: enable setting custom column order by visibleColumns #1739
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1739 +/- ##
==========================================
+ Coverage 93.70% 93.72% +0.01%
==========================================
Files 51 51
Lines 3259 3266 +7
Branches 448 450 +2
==========================================
+ Hits 3054 3061 +7
Misses 172 172
Partials 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
I like the idea. I'm not sure that custom columns without a key are retained. They should still find a place at the end of the list.
With 2.4.0.beta2, custom columns without a key are rendered at the end, however, react is complaining about the elements without a key. Unless, we come up with some automatic wrapping of each We can change the implementation to make sure custom columns will end up at the end, in case the |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Concerns have been addressed
Description
If the user define a custom column and gives it a unique key, the same key can be used in
visibleColumns
props to set its order of appearance among the columns:In case the
visibleColumns
property is absent, the custom columns would be added at the end.In the presence of
visibleColumns
, only those custom columns would appear in the grid that their key is listed in thevisibleColumns
.Fixes #1448
Type of change
Checklist