mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #4957 - Datatable: stripedRows do not work correctly with virtual scroll
This commit is contained in:
parent
f06c2ea23a
commit
ad98b8f795
2 changed files with 5 additions and 2 deletions
|
@ -368,7 +368,7 @@ const classes = {
|
|||
rowgroupHeader: 'p-rowgroup-header',
|
||||
rowGroupToggler: 'p-row-toggler p-link',
|
||||
rowGroupTogglerIcon: 'p-row-toggler-icon',
|
||||
row: ({ instance, props }) => {
|
||||
row: ({ instance, props, index }) => {
|
||||
let rowStyleClass = [];
|
||||
|
||||
if (props.selectionMode) {
|
||||
|
@ -387,6 +387,8 @@ const classes = {
|
|||
});
|
||||
}
|
||||
|
||||
rowStyleClass.push(index % 2 === 0 ? 'p-row-even' : 'p-row-odd');
|
||||
|
||||
return rowStyleClass;
|
||||
},
|
||||
rowExpansion: 'p-datatable-row-expansion',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue