diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/DataVizBox/DataVizBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx index 1cd72e29a..66a08f13e 100644 --- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx +++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx @@ -286,7 +286,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() im if (!this.layoutDoc._dataViz_schemaOG){ // makes a copy of the original table for the "live" toggle let csvRows = []; csvRows.push(keys.join(',')); - for (let i = 0; i < children.length; i++) { + for (let i = 0; i < children.length-1; i++) { let eachRow = []; for (let j = 0; j < keys.length; j++) { var cell = children[i][keys[j]]; @@ -306,7 +306,9 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() im const ogHref = CsvCast(ogDoc[this.fieldKey])? CsvCast(ogDoc[this.fieldKey]).url.href : undefined; const href = CsvCast(this.Document[this.fieldKey]).url.href if (ogHref && !DataVizBox.datasetSchemaOG.has(href)){ // sets original dataset to the var + const lastRow = current.pop(); DataVizBox.datasetSchemaOG.set(href, current); + current.push(lastRow!); fetch('/csvData?uri=' + ogHref) .then(res => res.json().then(action(res => !res.errno && DataVizBox.datasetSchemaOG.set(href, res)))); } |