How to do a ranking column in filament table that doesn't change?

So i want to build a ranking table with filament, where by the left most column will be called 'rank' it should go from 1 to (number of records) Then as i press the sort indicator on the other columns, it get sorted, but ranking number on the left side don't change Any idea how could I do it? So example: Rank | name | Push Ups | Sit Ups | Squats 1, Dan, 8, 6, 4 2, Harry, 7, 7, 5 So if i sort by push ups, Dan will be 1st, Harry will be 2nd if i sort by sit ups, Harry will be 1st, Dan will be 2nd Hope i am not too confusing. Thank you
Solution:
I checked and the above works for your use case. Simply add the following as the first column in your table. Tables\Columns\TextColumn::make('rank')->rowIndex(),...
Jump to solution
3 Replies
Solution
Wrax
Wrax3mo ago
I checked and the above works for your use case. Simply add the following as the first column in your table. Tables\Columns\TextColumn::make('rank')->rowIndex(),
pocket.racer
pocket.racerOP3mo ago
thank you
Want results from more Discord servers?
Add your server