Skip to content

Commit

Permalink
51d9b85d178d40f373e7985ca538125cb19a95e4 Dev fix: Better fix - the pr…
Browse files Browse the repository at this point in the history
…evious one didn't allow row level class/id for start/end only rows

Sync to source repo @51d9b85d178d40f373e7985ca538125cb19a95e4
  • Loading branch information
dtbuild committed Jul 10, 2024
1 parent cd19944 commit 9eb3fc2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 41 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": "03b1f67af4971638c9d1e5d1871307cce8d669e7"
"last-sync": "51d9b85d178d40f373e7985ca538125cb19a95e4"
}
28 changes: 9 additions & 19 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -3688,37 +3688,27 @@

// Split into rows
var rows = [];
for ( var i=0, ien=filtered.length ; i<ien ; i++ ) {

for (var i=0, ien=filtered.length; i<ien; i++) {
var val = filtered[i].val;

if (val.full) {
if ( val.full ) {
rows.push({
className: val.className,
id: val.id,
full: val.full
});
}

if (val.start && val.end) {
rows.push({
start: val.start,
end: val.end
});
}
else if (val.start) {
rows.push({
start: val.start
});
delete val.full;
}
else if (val.end) {
rows.push({
end: val.end
});

if (val.start || val.end) {
rows.push(val);
}
}

for (var row=0 ; row<rows.length ; row++) {
_layoutResolve( settings, rows[row] );
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.

28 changes: 9 additions & 19 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3635,37 +3635,27 @@ function _layoutArray ( settings, layout, side )

// Split into rows
var rows = [];
for ( var i=0, ien=filtered.length ; i<ien ; i++ ) {

for (var i=0, ien=filtered.length; i<ien; i++) {
var val = filtered[i].val;

if (val.full) {
if ( val.full ) {
rows.push({
className: val.className,
id: val.id,
full: val.full
});
}

if (val.start && val.end) {
rows.push({
start: val.start,
end: val.end
});
}
else if (val.start) {
rows.push({
start: val.start
});
delete val.full;
}
else if (val.end) {
rows.push({
end: val.end
});

if (val.start || val.end) {
rows.push(val);
}
}

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

return rows;
Expand Down

0 comments on commit 9eb3fc2

Please sign in to comment.