Row iteration #2019
-
Hi, i need to show row iteration to my custom column No. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So the simplest way to do this, assuming you want it to start at "1" not "0" First you need to add an Alpine attribute to expose the Row's index, so you'll need to set the following:
Then your Column can then make use of that "rowIndex" via an Alpine x-text:
Note that there's no second parameter on this Column. Setting a field/column that doesn't exist in your database, will result in an error. The first parameter in Column::make is the "label" for the Column, |
Beta Was this translation helpful? Give feedback.
So the simplest way to do this, assuming you want it to start at "1" not "0"
First you need to add an Alpine attribute to expose the Row's index, so you'll need to set the following:
Then your Column can then make use of that "rowIndex" via an Alpine x-text:
Note that there's no second parameter on this Column. Setting a field/column that doesn't…