aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 04e5ebb2c..e1ff4fda3 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -51,6 +51,7 @@ import { CollectionFreeFormRemoteCursors } from './CollectionFreeFormRemoteCurso
import './CollectionFreeFormView.scss';
import { MarqueeView } from './MarqueeView';
import React = require('react');
+import { SchemaCSVPopUp } from '../../nodes/DataVizBox/SchemaCSVPopUp';
export type collectionFreeformViewProps = {
NativeWidth?: () => number;
@@ -1984,7 +1985,9 @@ ScriptingGlobals.add(function datavizFromSchema(doc: Doc) {
for (let i=0; i < children.length; i++) {
let eachRow = [];
for (let j=0; j<keys.length; j++){
- eachRow.push(children[i][keys[j]]);
+ var cell = children[i][keys[j]];
+ if (cell && cell as string) cell = cell.toString().replace(/\,/g, '');
+ eachRow.push(cell);
}
csvRows.push(eachRow);
}
@@ -1994,6 +1997,12 @@ ScriptingGlobals.add(function datavizFromSchema(doc: Doc) {
const loading = Docs.Create.LoadingDocument(file, options);
loading.presentation_openInLightbox = true;
DocUtils.uploadFileToDoc(file, {}, loading);
- if (view.ComponentView?.addDocument) view.ComponentView?.addDocument(loading);
+ // if (view.ComponentView?.addDocument) view.ComponentView?.addDocument(loading);
+
+ if (view.ComponentView?.addDocument) {
+ SchemaCSVPopUp.Instance.addToCollection = view.ComponentView?.addDocument;
+ SchemaCSVPopUp.Instance.setDataVizDoc(loading);
+ SchemaCSVPopUp.Instance.setVisible(true);
+ }
})
}); \ No newline at end of file