Fix empty column issue (#13641)

Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
Monica Gupta
2020-12-03 09:32:15 -08:00
committed by GitHub
parent 67e3d2ebdb
commit f748a8c7bb

View File

@@ -164,11 +164,9 @@ export class CopyQueryWithResultsKeyboardAction extends Action {
for (let rowEntry of result.rows) { for (let rowEntry of result.rows) {
for (let colIdx = 0; colIdx < rowEntry.length; colIdx++) { for (let colIdx = 0; colIdx < rowEntry.length; colIdx++) {
let value = rowEntry[colIdx].displayValue; let value = rowEntry[colIdx].displayValue;
if (value) {
copyString = `${copyString}${value}\t`; copyString = `${copyString}${value}\t`;
htmlCopyString = `${htmlCopyString}<td style="border:solid black 1.0pt;white-space:nowrap">${escape(value)}</td>`; htmlCopyString = `${htmlCopyString}<td style="border:solid black 1.0pt;white-space:nowrap">${escape(value)}</td>`;
} }
}
// Removes the tab seperator from the end of a row // Removes the tab seperator from the end of a row
copyString = copyString.slice(0, -1 * '\t'.length) + '\n'; copyString = copyString.slice(0, -1 * '\t'.length) + '\n';
htmlCopyString = htmlCopyString + '</tr>'; htmlCopyString = htmlCopyString + '</tr>';