Updates
This commit is contained in:
@@ -11,6 +11,7 @@ export default function grabTextFieldType(
|
||||
if (field.css) return "css";
|
||||
if (field.javascript) return "javascript";
|
||||
if (field.shell) return "shell";
|
||||
if (field.markdown) return "markdown";
|
||||
if (nullReturn) return undefined;
|
||||
return "plain";
|
||||
}
|
||||
|
||||
@@ -122,15 +122,16 @@ export default function ({
|
||||
/**
|
||||
* Handle scenario where this table is a child of another
|
||||
*/
|
||||
if (
|
||||
currentTableSchema.childTable &&
|
||||
currentTableSchema.childTableDbId &&
|
||||
currentTableSchema.childTableDbId
|
||||
) {
|
||||
const targetParentDatabase = grabPrimaryRequiredDbSchema({
|
||||
dbId: currentTableSchema.childTableDbId,
|
||||
userId,
|
||||
});
|
||||
if (currentTableSchema.childTable && currentTableSchema.childTableDbId) {
|
||||
const isParentDbCurrentDb =
|
||||
currentTableSchema.childTableDbId == newCurrentDbSchema.id;
|
||||
|
||||
const targetParentDatabase = isParentDbCurrentDb
|
||||
? newCurrentDbSchema
|
||||
: grabPrimaryRequiredDbSchema({
|
||||
dbId: currentTableSchema.childTableDbId,
|
||||
userId,
|
||||
});
|
||||
|
||||
const targetParentDatabaseTableIndex =
|
||||
targetParentDatabase?.tables.findIndex(
|
||||
|
||||
@@ -26,6 +26,7 @@ export default function setTextFieldType(
|
||||
if (type == "yaml") return { ...newField, yaml: true };
|
||||
if (type == "javascript") return { ...newField, javascript: true };
|
||||
if (type == "code") return { ...newField, code: true };
|
||||
if (type == "markdown") return { ...newField, markdown: true };
|
||||
|
||||
return { ...newField };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user