frappe / datatable

The Missing Javascript Datatable for the Web
https://frappe.io/datatable
MIT License
1.02k stars 164 forks source link

feat: 🎸 Total Accumulator hook for totals row #55

Closed SaiFi0102 closed 5 years ago

SaiFi0102 commented 5 years ago

Added the option to add an event "accumulator" which will be used to calculate the totals row. See the referenced PR for frappe for screenshots.

DataTable looks for hooks.totalAccumulator. If it finds the function, it will call it otherwise it will use it's default accumulator logic.

If the accumulator event function returns a false, the DataTable's default accumulator logic will be used.

netchampfaris commented 5 years ago

:tada: This PR is included in version 1.9.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: