From 76240c83ebc7b18c92bd8efe0141b796963eb9d0 Mon Sep 17 00:00:00 2001 From: Max Postema <46395349+MaxPostema@users.noreply.github.com> Date: Wed, 27 Nov 2024 09:35:01 +0100 Subject: [PATCH] fix(molgenis-components): missing expression data in ref input (#4510) * fix(molgenis-components): missing expression data in ref input --- apps/molgenis-components/src/components/forms/FormInput.vue | 4 ++++ .../src/components/forms/InputRefBack.vue | 6 +++++- apps/molgenis-components/src/components/forms/RowEdit.vue | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/molgenis-components/src/components/forms/FormInput.vue b/apps/molgenis-components/src/components/forms/FormInput.vue index debc318890..9d4992dc9e 100644 --- a/apps/molgenis-components/src/components/forms/FormInput.vue +++ b/apps/molgenis-components/src/components/forms/FormInput.vue @@ -99,6 +99,10 @@ export default { required: false, default: () => null, }, + expressionData: { + type: Object, + required: false, + }, refBackId: { type: String, required: false, diff --git a/apps/molgenis-components/src/components/forms/InputRefBack.vue b/apps/molgenis-components/src/components/forms/InputRefBack.vue index a6e3a73f2d..525965c069 100644 --- a/apps/molgenis-components/src/components/forms/InputRefBack.vue +++ b/apps/molgenis-components/src/components/forms/InputRefBack.vue @@ -134,6 +134,10 @@ export default { type: [Object, null], required: true, }, + expressionData: { + type: Object, + required: false, + }, schemaId: { type: String, required: false, @@ -234,7 +238,7 @@ export default { .fetchTableMetaData(this.tableId) .catch((error) => (this.graphqlError = error.message)); this.defaultValue = new Object(); - this.defaultValue[this.refBackId] = await this.pkey; + this.defaultValue[this.refBackId] = this.expressionData; await this.reload(); }, }; diff --git a/apps/molgenis-components/src/components/forms/RowEdit.vue b/apps/molgenis-components/src/components/forms/RowEdit.vue index ab5d429c79..3d62170d2d 100644 --- a/apps/molgenis-components/src/components/forms/RowEdit.vue +++ b/apps/molgenis-components/src/components/forms/RowEdit.vue @@ -5,6 +5,7 @@ :key="JSON.stringify(column)" :id="`${id}-${column.id}`" :modelValue="internalValues[column.id]" + :expressionData="internalValues" :columnType="column.columnType" :description="column.description" :errorMessage="errorPerColumn[column.id]"