Updates
This commit is contained in:
@@ -16,6 +16,8 @@ function grabTextFieldType(field, nullReturn) {
|
||||
return "javascript";
|
||||
if (field.shell)
|
||||
return "shell";
|
||||
if (field.markdown)
|
||||
return "markdown";
|
||||
if (nullReturn)
|
||||
return undefined;
|
||||
return "plain";
|
||||
|
||||
+8
-7
@@ -68,13 +68,14 @@ function default_1({ currentDbSchema, currentTableSchema, currentTableSchemaInde
|
||||
/**
|
||||
* Handle scenario where this table is a child of another
|
||||
*/
|
||||
if (currentTableSchema.childTable &&
|
||||
currentTableSchema.childTableDbId &&
|
||||
currentTableSchema.childTableDbId) {
|
||||
const targetParentDatabase = (0, grab_required_database_schemas_1.grabPrimaryRequiredDbSchema)({
|
||||
dbId: currentTableSchema.childTableDbId,
|
||||
userId,
|
||||
});
|
||||
if (currentTableSchema.childTable && currentTableSchema.childTableDbId) {
|
||||
const isParentDbCurrentDb = currentTableSchema.childTableDbId == newCurrentDbSchema.id;
|
||||
const targetParentDatabase = isParentDbCurrentDb
|
||||
? newCurrentDbSchema
|
||||
: (0, grab_required_database_schemas_1.grabPrimaryRequiredDbSchema)({
|
||||
dbId: currentTableSchema.childTableDbId,
|
||||
userId,
|
||||
});
|
||||
const targetParentDatabaseTableIndex = targetParentDatabase === null || targetParentDatabase === void 0 ? void 0 : targetParentDatabase.tables.findIndex((tbl) => tbl.id == currentTableSchema.childTableId);
|
||||
const targetParentDatabaseTable = typeof targetParentDatabaseTableIndex == "number"
|
||||
? targetParentDatabaseTableIndex < 0
|
||||
|
||||
@@ -32,5 +32,7 @@ function setTextFieldType(field, type) {
|
||||
return Object.assign(Object.assign({}, newField), { javascript: true });
|
||||
if (type == "code")
|
||||
return Object.assign(Object.assign({}, newField), { code: true });
|
||||
if (type == "markdown")
|
||||
return Object.assign(Object.assign({}, newField), { markdown: true });
|
||||
return Object.assign({}, newField);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user