Skip to content

Commit eb058fd

Browse files
committed
Allow components that have been registered
1 parent f775788 commit eb058fd

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/AutoForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ async function submitForm(form:HTMLFormElement) {
190190
if (HttpMethods.hasRequestBody(method)) {
191191
let requestDto = new dto.constructor()
192192
let formData = new FormData(form)
193-
// console.debug('AutoForm.submitForm', requestDto, formData)
193+
// console.debug('AutoForm.submitForm', requestDto, [...formData.keys()], [...formData.values()])
194194
if (!returnsVoid) {
195195
api.value = await client.apiForm(requestDto, formData, { jsconfig })
196196
} else {

src/use/metadata.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,14 @@ export function supportsProp(prop?:MetadataPropertyType) {
221221
if (!prop?.type) return false
222222
const type = propType(prop)!
223223
if ((prop.isValueType && type.indexOf('`') == -1) || prop.isEnum) return true
224-
if (prop.input?.type == 'hidden') return true
225-
if (prop.input?.type == 'file') return true
226-
if (prop.input?.type == 'tag') return true
227-
if (prop.input?.type == 'combobox') return true
224+
const propInputType = prop.input?.type
225+
if (propInputType) {
226+
if (propInputType == 'hidden') return true
227+
if (propInputType == 'file') return true
228+
if (propInputType == 'tag') return true
229+
if (propInputType == 'combobox') return true
230+
if (Sole.components?.[propInputType]) return true
231+
}
228232

229233
return inputType(prop.type) != null
230234
}

0 commit comments

Comments
 (0)