Skip to content

Commit c4005f4

Browse files
committed
feat(slots): Add default slots to data components
1 parent 87a3119 commit c4005f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/FormKitDataEdit.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ function handleSave() {
6262
}"
6363
@submit="handleSave"
6464
>
65-
<FormKitSchema :schema="formSchema" :data="formData" />
65+
<FormKitSchema v-if="formSchema" :schema="formSchema" :data="formData" />
66+
<slot />
6667
</FormKit>
6768
<FormKitDebug v-if="debugData" :data="formData" header="Data" />
6869
<FormKitDebug v-if="debugSchema" :data="formSchema" header="Schema" />

src/components/FormKitDataView.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const formData = ref(props.data)
3838
:form-class="formClass"
3939
:actions="false"
4040
>
41-
<FormKitSchema :schema="formSchema" :data="formData" />
41+
<FormKitSchema v-if="formSchema" :schema="formSchema" :data="formData" />
42+
<slot />
4243
</FormKit>
4344
<FormKitDebug v-if="debugData" :data="formData" header="Data" />
4445
<FormKitDebug v-if="debugSchema" :data="formSchema" header="Schema" />

0 commit comments

Comments
 (0)