Row numbering Excel-style
Closed this issue · 2 comments
naho2081 commented
Is it possible to add numbers to the table rows like this?
1.
2.
3...
Actually it is number of the row in the reactiveTable.
If I move to Page 2 (assuming I have 50 rows per page) numbers should continue like this
51.
52.
53..
naho2081 commented
Solved this using CSS.
It doesn't take into account pagination but at least rows have numbers.
table
counter-reset rowNumber
tbody
tr
counter-increment rowNumber
td
&:first-child
&::before
content counter(rowNumber)
min-width 1em
margin-right 1em
aslagle commented
I'm glad you figured something out. I don't think there's a better way to do this unless you store numbers with your data.