ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

Aggregate Row #128

Open isaacmillercodes opened 7 years ago

isaacmillercodes commented 7 years ago

Hi ratiw! Thanks for making and continuing to support vue-table.

Is it possible to have one row at the top of the table that calculates aggregate data from the other rows?

Let's say I had a table for students that had a column for name and another for the number of classes that student is taking.

Could I have my first row use the name column to populate the total number of students and the classes column to show how many classes the average student takes (e.g. 4 students taking 18 classes total, so the first row would show 4.5 in the classes column).

I'm using an external API so I can't incorporate that functionality on the server side without creating an intermediate layer.

ratiw commented 7 years ago

@isaacmillercodes Sorry, it is not possible.