-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Adds support for table data grouping (2nd attempt, see: #126) #130
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
===========================================
+ Coverage 98.59% 100.00% +1.40%
===========================================
Files 16 13 -3
Lines 498 420 -78
Branches 171 159 -12
===========================================
- Hits 491 420 -71
+ Misses 5 0 -5
+ Partials 2 0 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit 86ce17a.
63a45ad to
9d8993b
Compare
9d8993b to
cb3246a
Compare
| @@ -4,34 +4,15 @@ | |||
| import { test, expect, describe } from 'vitest'; | |||
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.
Minor: typo in the file name ("expadable")
| expandableRows: { getId, getParentId }, | ||
| selection: { defaultSelectedItems: [{ id: 'a' }, { id: 'a.1.1' }], keepSelection: true }, | ||
| }); | ||
| expect(expandable.result.collectionProps.expandableRows!.getSelectedItemsCount).toBe(undefined); |
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.
Minor: why were these assertions for undefined functions moved out of their dedicated test does not return per-item counts when dataGrouping=undefined that existed in #126? At least for me, that test description helped me understand the reason of these assertions.
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 think this way the difference between dataGrouping: undefined and dataGrouping: {} is better clear. I will add code comments to explain the assertions.
This reverts commit 86ce17a.
See detailed description and discussion here: #126
Depends on:
This PR adds changes on top of #126. Specifically, the expandableRows result was updated with its own totalItemsCount and totalSelectedItemsCount - to be de-coupled from collectionProps.totalItemsCount. That is because the collectionProps.totalItemsCount shall return the total number of root items, while expandableRows.totalItemsCount returns the total number of leaf items. The change can be seen in this commit: cb3246a.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.