Fix adding a blank row in "copy to clipboard" for each repeating header row

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2025-01-07 13:48:50 +01:00
parent 71fb45ace5
commit 2baf6b33b8
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 4 additions and 1 deletions

View File

@ -377,6 +377,9 @@ AJAX.registerOnload('sql.js', function () {
textArea.value += '\n';
$('.table_results tbody tr').each(function () {
if ($(this).hasClass('repeating_header_row')) {
return;
}
$(this).find('.data span').each(function () {
// Extract <em> tag for NULL values before converting to string to not mess up formatting
var data = $(this).find('em').length !== 0 ? $(this).find('em')[0] : this;

View File

@ -2906,7 +2906,7 @@ class Results
array $descriptions,
int $numEmptyColumnsAfter
): string {
$headerHtml = '<tr>' . "\n";
$headerHtml = '<tr class="repeating_header_row">' . "\n";
if ($numEmptyColumnsBefore > 0) {
$headerHtml .= ' <th colspan="'