material-table icon indicating copy to clipboard operation
material-table copied to clipboard

What is the proper way to have a sum row?

Open bluryi opened this issue 7 years ago • 6 comments

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!

bluryi avatar Apr 12 '19 16:04 bluryi

Hi @bluryi ,

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

mbrn avatar Apr 12 '19 17:04 mbrn

Got it. Thanks a lot!

bluryi avatar Apr 12 '19 18:04 bluryi

Seconded. Summary will be really useful!

codenamethanos avatar Jun 28 '19 20:06 codenamethanos

Any update on this feature?

jasonvooo avatar Aug 08 '19 06:08 jasonvooo

Any update on this feature?

rxhl avatar Aug 16 '19 19:08 rxhl

Any update on this feature?

RaphaelSparK avatar Aug 23 '19 16:08 RaphaelSparK