Material-table: What is the proper way to have a sum row?

Created on 12 Apr 2019  路  6Comments  路  Source: mbrn/material-table

Hi-

Could anyone show me what is the proper way to have a sum/subtotal row that can be excluded from column sorting?
For example:

columns={[
                { title: 'Name', field: 'name', defaultSort: 'asc' },
                { title: 'Candy', field: 'candy', type: 'numeric' },
              ]}
data={[{ name: 'Mehmet', candy: 2 }, { name: 'Zerya', candy: 3 }]}

Now I want to add a sum row at the end which has "Total 5", and this row should be fixed at the bottom.
Is there a way to do this?

Thanks in advance!

duplicate feature

Most helpful comment

Hi @bluryi ,

I am planning to add summary row feature (#27). It will be done asap.

All 6 comments

Hi @bluryi ,

I am planning to add summary row feature (#27). It will be done asap.

Got it. Thanks a lot!

Seconded. Summary will be really useful!

Any update on this feature?

Any update on this feature?

Any update on this feature?

Was this page helpful?
0 / 5 - 0 ratings