We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose rowIndex as a template variable in addition to existing column and rowdata;
<p-column field="color" header="Color"> <template #col #car="rowData" #ri="rowIndex"> {{ri}} <span [style.color]="car[col.field]">{{car[col.field]}}</span> </template> </p-column>
The text was updated successfully, but these errors were encountered:
4dafa57
I've noticed that rowIndex is actually an absolute row index:
rowIndex
((page_number - 1) * items_per_page + row_number)
It's nice but if I use lazy loaded datatable rowIndex can't help me a lot because it doesn't match item's index in component's collection.
Example: I'm lazy loading events in datatable with 5 items limit and I want to be able to remove an event from events array by index.
events: [ {event a}, {event b}, {event c}, {event d}, {event e} ];
Clicking on 2nd row's delete button will remove events[1] element - Great!
events: [ {event f}, {event g}, {event h}, {event i}, {event j} ];
Clicking on 2nd row's delete button will remove events[6] element - but no! There is no event at position 6 😢
So I suggest renaming rowIndex to absRowIndex and adding relRowIndex variable that will return relative row index for current datatable page.
absRowIndex
relRowIndex
Sorry, something went wrong.
Device detail: Refresh entire device (primefaces#268)
e24c6b5
cagataycivici
No branches or pull requests
Expose rowIndex as a template variable in addition to existing column and rowdata;
The text was updated successfully, but these errors were encountered: