diff --git a/v3/src/data-interactive/handlers/data-context-list-handler.ts b/v3/src/data-interactive/handlers/data-context-list-handler.ts index 7ac19a706d..4f45059679 100644 --- a/v3/src/data-interactive/handlers/data-context-list-handler.ts +++ b/v3/src/data-interactive/handlers/data-context-list-handler.ts @@ -16,7 +16,7 @@ export const diDataContextListHandler: DIHandler = { return { name: dataSet.name, guid: id, - title: dataSet._title, + title: dataSet.title, id } }) diff --git a/v3/src/utilities/csv-import.ts b/v3/src/utilities/csv-import.ts index 5701261611..6fe0450eb8 100644 --- a/v3/src/utilities/csv-import.ts +++ b/v3/src/utilities/csv-import.ts @@ -13,7 +13,10 @@ export function downloadCsvFile(dataUrl: string, onComplete: (results: CsvParseR } export function convertParsedCsvToDataSet(results: CsvParseResult, filename: string) { - const ds = DataSet.create({ name: filename }) + // Remove extension + // From https://stackoverflow.com/questions/4250364/how-to-trim-a-file-extension-from-a-string-in-javascript + const name = filename.replace(/\.[^/.]+$/, "") + const ds = DataSet.create({ name }) // add attributes (extracted from first case) for (const pName in results.data[0]) { ds.addAttribute({name: pName})