diff --git a/packages/core/client/src/flow/flowSetting/TitleField.tsx b/packages/core/client/src/flow/flowSetting/TitleField.tsx index 726e3050c1..ae62e84834 100644 --- a/packages/core/client/src/flow/flowSetting/TitleField.tsx +++ b/packages/core/client/src/flow/flowSetting/TitleField.tsx @@ -46,7 +46,7 @@ export const titleField = defineAction({ }, }, defaultParams: (ctx: any) => { - const targetCollection = ctx.model.targetCollection; + const targetCollection = ctx.model.collectionField.targetCollection; const filterKey = getUniqueKeyFromCollection(targetCollection.options as any); return { label: ctx.model.props.fieldNames?.label || targetCollection.options.titleField || filterKey, @@ -55,7 +55,6 @@ export const titleField = defineAction({ async handler(ctx: any, params) { const target = ctx.model.collectionField.target; const targetCollection = ctx.model.collectionField.targetCollection; - console.log(ctx.model.collectionField); const filterKey = getUniqueKeyFromCollection(targetCollection.options as any); const label = params.label || targetCollection.options.titleField || filterKey; const newFieldNames = { diff --git a/packages/core/client/src/flow/models/data-blocks/form/FormModel.tsx b/packages/core/client/src/flow/models/data-blocks/form/FormModel.tsx index 7654f82cc7..63d97e9a18 100644 --- a/packages/core/client/src/flow/models/data-blocks/form/FormModel.tsx +++ b/packages/core/client/src/flow/models/data-blocks/form/FormModel.tsx @@ -22,6 +22,7 @@ export class FormModel extends DataBlockModel { declare resource: SingleRecordResource; render() { + console.log(this); return ( @@ -53,7 +54,7 @@ export class FormModel extends DataBlockModel { subModelBaseClass="EditableFieldModel" onSubModelAdded={async (model: EditableFieldModel) => { const params = model.getStepParams('default', 'step1'); - this.addAppends(params?.fieldPath, true); + this.addAppends(params?.fieldPath, !!this.ctx.shared?.currentFlow?.extra?.filterByTk); }} />