Skip to content

Commit 9956be0

Browse files
add file type filter Save data dialog (#88)
1 parent e46434a commit 9956be0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/views/tableView.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,14 @@ export class TableView {
409409
let dataFilePath: string = path.dirname(this._fileInfo.filePath);
410410
dataFilePath = path.join(dataFilePath, dataFileName);
411411

412+
// file filter to use in save dialog
413+
const fileFilter: any = {};
414+
fileFilter[dataFileType] = [dataFileType];
415+
412416
// display save file dialog
413417
const dataFileUri: Uri | undefined = await window.showSaveDialog({
414-
defaultUri: Uri.parse(dataFilePath).with({ scheme: 'file' })
418+
defaultUri: Uri.parse(dataFilePath).with({ scheme: 'file' }),
419+
filters: fileFilter
415420
});
416421

417422
if (dataFileType === 'arrow') {

0 commit comments

Comments
 (0)