Skip to content

Commit

Permalink
03b1f67af4971638c9d1e5d1871307cce8d669e7 Dev: WIP Fix for rowId/rowCl…
Browse files Browse the repository at this point in the history
…ass not being used

Sync to source repo @03b1f67af4971638c9d1e5d1871307cce8d669e7
  • Loading branch information
dtbuild committed Jul 10, 2024
1 parent 7d916c8 commit cd19944
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 17 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.0.8",
"last-sync": "17048ed12a967fac6abf1d2919646ad70d08d2a3"
"last-sync": "03b1f67af4971638c9d1e5d1871307cce8d669e7"
}
33 changes: 26 additions & 7 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -3689,17 +3689,36 @@
// Split into rows
var rows = [];
for ( var i=0, ien=filtered.length ; i<ien ; i++ ) {
if ( filtered[i].val.full ) {
rows.push( {full: filtered[i].val.full} );
_layoutResolve( settings, rows[ rows.length - 1 ] );
var val = filtered[i].val;

delete filtered[i].val.full;
if (val.full) {
rows.push({
className: val.className,
id: val.id,
full: val.full
});
}

if ( filtered[i].val.start || filtered[i].val.end ) {
rows.push( filtered[i].val );
_layoutResolve( settings, rows[ rows.length - 1 ] );
if (val.start && val.end) {
rows.push({
start: val.start,
end: val.end
});
}
else if (val.start) {
rows.push({
start: val.start
});
}
else if (val.end) {
rows.push({
end: val.end
});
}
}

for (var row=0 ; row<rows.length ; row++) {
_layoutResolve( settings, rows[row] );
}

return rows;
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

33 changes: 26 additions & 7 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3636,17 +3636,36 @@ function _layoutArray ( settings, layout, side )
// Split into rows
var rows = [];
for ( var i=0, ien=filtered.length ; i<ien ; i++ ) {
if ( filtered[i].val.full ) {
rows.push( {full: filtered[i].val.full} );
_layoutResolve( settings, rows[ rows.length - 1 ] );
var val = filtered[i].val;

delete filtered[i].val.full;
if (val.full) {
rows.push({
className: val.className,
id: val.id,
full: val.full
});
}

if ( filtered[i].val.start || filtered[i].val.end ) {
rows.push( filtered[i].val );
_layoutResolve( settings, rows[ rows.length - 1 ] );
if (val.start && val.end) {
rows.push({
start: val.start,
end: val.end
});
}
else if (val.start) {
rows.push({
start: val.start
});
}
else if (val.end) {
rows.push({
end: val.end
});
}
}

for (var row=0 ; row<rows.length ; row++) {
_layoutResolve( settings, rows[row] );
}

return rows;
Expand Down

0 comments on commit cd19944

Please sign in to comment.