Update footer SUM on filter #413
Replies: 1 comment
-
Okay just wanted to update.. I got it resolved this way if anyone needs in future. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I simply love this library. Thanks a lot for this awesome library. I am stuck at a issue where in I am trying to add a footer showing the sum of the rows, which actually works. But when I filter the data (any column irrespective of the footer field), I want to update the footer (which actually shows the sum).
This is what I have tried and seems not to work on filter. Any suggestions would be helpful. Thanks again.
This is what I did..
const sumLt = savingsData.reduce((sum, product) => sum + Number(product.lt!==null ?product.lt : 0 ), 0);
Footer: () => (
Sum of LT: {formatAmount(Math.round(sumLt))}
),
.
.
.
[sumLt]
Beta Was this translation helpful? Give feedback.
All reactions