From 364af2caa99b7a923e6dd4ed4a508136adaacad1 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 3 Jul 2024 16:13:45 +0200 Subject: [PATCH] Small fix for `addTable` method There was an issue with the `tableData` object. Each row needs to be an array. --- packages/core/README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index ac8ced92bb..564895614c 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -451,16 +451,19 @@ For example ```typescript const tableData = [ - {data: 'Header1', header: true}, - {data: 'Header2', header: true}, - {data: 'Header3', header: true}, - {data: 'MyData1'}, - {data: 'MyData2'}, - {data: 'MyData3'} -] + [ + {data: 'Header1', header: true}, + {data: 'Header2', header: true}, + {data: 'Header3', header: true}, + ], [ + {data: 'MyData1'}, + {data: 'MyData2'}, + {data: 'MyData3'} + ] +]; // Add an HTML table -core.summary.addTable([tableData]) +core.summary.addTable(tableData) // Output:
Header1Header2Header3
MyData1MyData2MyData3
``` @@ -483,4 +486,4 @@ core.summary.emptyBuffer() // Writes text in the buffer to the summary buffer file and empties the buffer, optionally overwriting all existing content in the summary file with buffer contents. Defaults to false. core.summary.write({overwrite: true}) -``` \ No newline at end of file +```