-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Group aggregates with filters rendering blank header rows #4679
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
Comments
To do this you need to write code such that the currency filter is only applied to the detail rows. Options to do this would include:
|
Paul, I actually was attempting to do option 2, but was unable to figure out the right row or aggregation property that would let me accomplish that. Could you point me in the right direction on that? Thanks! |
If anyone finds out how to do option 2 please let me know, looking to do the same thing. Thanks! |
@gpkarma I ended up doing this (super hacky) method: Set the
Then you can set the
This one obviously only works for currency columns, but you can add to it in order to filter based on the columns filter. It's not pretty, but it works. |
@mltroutt where do I want to reference the customTreeAggregationFinalizerFn from in my column def? I have not used it before. Thanks. |
Never mind, I figured it out. You meant the columnTreeAggregationFinalizerFn attribute on the column def. |
Yes, looks like COL_FIELD will assume a different value (maybe the counter?) on the header rows, and that's why I'm using this as columnTreeAggregationFinalizerFn (for all my columns):
and all my templates are like this:
this way all non-string values are correctly formatted in both header and normal rows, but TBH now I have a possibly related sort issue on the second level group: it get sorted by count (number of rows in the group) instead of value. It's quite strange since if I use the same column as first-level group it get correctly sorted by value. |
Example here with the Balance column: http://plnkr.co/edit/dPTSR4HewMocYDqsmpEm?p=preview
What I'm trying to accomplish is have the Balance column header be
<aggregation label> <rendered content>
and the cell values be the default<rendered content>
with the currency filter applied.When a filter is not applied (i.e. the currency cellFilter is removed) I get the correct header behavior, but then neither the content nor the header is rendered with the filter as I would like it to be.
I've tried a few different things with the
customTreeAggregationFinalizerFn
function, but nothing seems to quite get the effect I'm looking for. It seems to be either I can get the header rows rendered correctly or I can get the data rows rendered correctly, but not both at once.Is it possible to do this?
The text was updated successfully, but these errors were encountered: