dmk99 / react-pdf-table

Storybook Available
https://dmk99.github.io/react-pdf-table
MIT License
152 stars 62 forks source link

How to get row index? #35

Closed hkar19 closed 3 years ago

hkar19 commented 3 years ago

For example, i need to show the row index number in a column.

in current DataTableCell, this cell will be given only the data on that row without knowing the index of the row.

is there a way to get row index, or should i make it into the data itself?

dmk99 commented 3 years ago

I would recommend that you store the index on the data items themselves. The reason for this is if you needed to split the rows between multiple pages you wouldn’t lose your numbering.