Calculating the average of column on Search
Calculating the average of column on Search

Hi guys! I'm using this https://datatables.net/examples/advanced_init/footer_callback.html to calculate the average of a column. I just wanna ask if there's a way to recalculate my average upon searching using this method or there is more appropriate way to do this?
my problem here is whenever I search, the table will change but not the average. I wan to get the average of the searched data.
Thanks for your help guys! I'm pretty new in webdev so i really need your help
This discussion has been closed.
Answers
Hi @katazumorito ,
You would use a selector-modifier, like this example here. That example is using
page: 'current'
, you could also havesearch: 'applied'
,Cheers,
Colin