From 660cf3a50cebc89cbc6beb2d489035436437f187 Mon Sep 17 00:00:00 2001 From: dcruvolo Date: Tue, 10 Dec 2024 13:30:27 +0100 Subject: [PATCH] feat: initial form connection --- .../components/form/Field.vue | 14 +++++++++++++ .../components/form/FieldInput.vue | 20 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/apps/tailwind-components/components/form/Field.vue b/apps/tailwind-components/components/form/Field.vue index e6926a7bee..609f1a6620 100644 --- a/apps/tailwind-components/components/form/Field.vue +++ b/apps/tailwind-components/components/form/Field.vue @@ -35,6 +35,18 @@ function validate(value: columnValue) { formFieldInput.value.validate(value); } + +const refData = ref(); + +onMounted(async () => { + if (["ONTOLOGY", "ONTOLOGY_ARRAY"].includes(props.column.columnType)) { + const response = await fetchTableData( + props.column.refSchemaId as string, + props.column.refTableId as string + ); + refData.value = response.rows.map((row) => row.name); + } +});