-
Notifications
You must be signed in to change notification settings - Fork 9
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
DataViewModel Supports Multiple, Settable SortBy and GroupBy Fields #1715
Conversation
cmp/dataview/DataViewModel.js
Outdated
return field !== sortBy; | ||
}).map(field => { | ||
return { | ||
colId: field, |
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.
Not sure if I need colIds here, as field seems to be sufficient identification (at least in the toolbox examples)
Petra and I working through this one. |
Signed-off-by: Petra Laohakul <[email protected]>
cmp/grid/Grid.js
Outdated
@@ -201,6 +201,7 @@ class LocalModel { | |||
}, | |||
popupParent: document.querySelector('body'), | |||
suppressAggFuncInHeader: true, | |||
suppressMakeColumnVisibleAfterUnGroup: true, |
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 thought a bit more about this -- let's just apply this now in DataView's agOptions, where we know we absolutely want this, and that will allow us to move forward with our DataView enhancements.
Think changing Grid default itself needs to be done with a bit more care, testing, and consideration of what we want for our grouping API.
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.
Great, I moved it to DataView only and its localModel now accepts props and agOptions defined as PT to allow for overriding of the suppressMakeColumnVisibleAfterUngroup prop
…umnVisibleAfterUngroup is set to true Removed property from Grid
+ Clarify Change Message Petra and Lee co-dev
Discussed with Petra - she will enhance toolbox with better examples here, but looking forward to getting this in to v30 to more fully round-out the API changes to DataView/ |
Hoist P/R Checklist
Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.
develop
branch as of last change.breaking-change
label + CHANGELOG if so.If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.
This PR addresses #1681
DataViewModel now pushes all store fields as columns but renders only the
sortBy
field as visible. This allows for multiple sorters and groupings as well as making them settable through GridModel's trampolined setter methods.