mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Adding Skip options when importing multiple tables.
Summary: Adding new destination "Skip" for multiple table imports. Selecting this destination skips the import and makes the preview grayed out. Test Plan: New Tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3181
This commit is contained in:
@@ -5,7 +5,8 @@ import * as _ from 'underscore';
|
||||
|
||||
import {ColumnDelta, createEmptyActionSummary} from 'app/common/ActionSummary';
|
||||
import {ApplyUAResult, DataSourceTransformed, ImportOptions, ImportResult, ImportTableResult,
|
||||
MergeOptions, MergeOptionsMap, MergeStrategy, TransformColumn, TransformRule,
|
||||
MergeOptions, MergeOptionsMap, MergeStrategy, SKIP_TABLE, TransformColumn,
|
||||
TransformRule,
|
||||
TransformRuleMap} from 'app/common/ActiveDocAPI';
|
||||
import {ApiError} from 'app/common/ApiError';
|
||||
import {BulkColValues, CellValue, fromTableDataAction, TableRecordValue} from 'app/common/DocActions';
|
||||
@@ -329,6 +330,10 @@ export class ActiveDocImport {
|
||||
createdTableId = hiddenTableId;
|
||||
|
||||
} else {
|
||||
if (destTableId === SKIP_TABLE) {
|
||||
await this._activeDoc.applyUserActions(docSession, [['RemoveTable', hiddenTableId]]);
|
||||
continue;
|
||||
}
|
||||
// Do final import
|
||||
const mergeOptions = mergeOptionsMap[origTableName] ?? null;
|
||||
const intoNewTable: boolean = destTableId ? false : true;
|
||||
|
||||
Reference in New Issue
Block a user