How do you get the dynamic / current row index / position? #2974
Unanswered
MarkConway94
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Yah, I think you can use something like this for: |
Beta Was this translation helpful? Give feedback.
2 replies
-
Render allows you to pass in props so you can do
then in your column setup
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm using a table with useSortBy and was wondering if its possible for a row to dynamically know its current position in the table.
I have seen that rows have an index variable which is their original position in the table but there is no dynamic or current index variable.
My use case is displaying football league data and it would be useful for a row to know its current position in the table after sorting by points or goals etc.
This way I can have a 'position' column where the row can use its current position for the value. It would also be useful for implementing different styling based on current row position.
Thanks,
Mark
Beta Was this translation helpful? Give feedback.
All reactions