Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom component in nested object #7

Open
jafda opened this issue Oct 8, 2019 · 1 comment
Open

Custom component in nested object #7

jafda opened this issue Oct 8, 2019 · 1 comment

Comments

@jafda
Copy link

jafda commented Oct 8, 2019

@crickford Using the advance demo, i am trying to use the rating component in a nested object. The default input box shows instead of the rating component. It appears only root object items are supported, any thoughts to nested obects?

Looks like it the code processing custom component is SchemaForm.vue:
<template v-for="(property, key) in schema.properties"> <slot :name="key" :item="{key: key, schema: property, value: items[key], update: updateValue}"> <component :is="element" :key="key" :schema="property" :value="items[key]" @input="updateValue($event, key)"></component> </slot> </template>

Schema Example:
{ "type": "object", "properties": { "test": { "type": "object", "properties" : { "teststring": { "type": "string", "title": "Test String" }, "rating": { "type": "number", "title": "Rating", "minimum": 0, "maximum": 5 } } } } }

@tooolbox
Copy link

Might need to do something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants