Skip to content

Commit

Permalink
f56b29ff93c334811d0292b64c9b696954a16fd1 Fix: `-api table().footer.st…
Browse files Browse the repository at this point in the history
…ructure()` would give `undefined` for a footer's title if the title span had been overwritten

https://datatables.net/forums/discussion/78352

Sync to source repo @f56b29ff93c334811d0292b64c9b696954a16fd1
  • Loading branch information
dtbuild committed Mar 1, 2024
1 parent d9ece74 commit fd77e63
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 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.1",
"last-sync": "c0b622d486679cdb3c3b5fa303af3bd257c21f2a"
"last-sync": "f56b29ff93c334811d0292b64c9b696954a16fd1"
}
6 changes: 5 additions & 1 deletion js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -3266,11 +3266,15 @@
colspan++;
}

var titleSpan = $('span.dt-column-title', cell);

structure[row][column] = {
cell: cell,
colspan: colspan,
rowspan: rowspan,
title: $('span.dt-column-title', cell).html()
title: titleSpan.length
? titleSpan.html()
: $(cell).html()
};
}
}
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.

6 changes: 5 additions & 1 deletion js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3213,11 +3213,15 @@ function _fnHeaderLayout( settings, source, incColumns )
colspan++;
}

var titleSpan = $('span.dt-column-title', cell);

structure[row][column] = {
cell: cell,
colspan: colspan,
rowspan: rowspan,
title: $('span.dt-column-title', cell).html()
title: titleSpan.length
? titleSpan.html()
: $(cell).html()
};
}
}
Expand Down

0 comments on commit fd77e63

Please sign in to comment.