CyCraft / CyCraft/blitzar

Recursive component generation

Open
#119 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
126
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Hey, I was wondering whether it's somehow possible to generate a form using a schema with components that have sub-components in them. For example using this schema:

```js
const schema =[
{
id: 'name',
component: 'input',
label: 'first name'
},
{
id: 'surname',
component: 'input',
label: 'Last name'
},
{
id: 'country',
component: 'select',
label: 'Country',
subLabel: 'Country you live in',
subSchema:[
{
id: 'province',
component: 'select',
label: 'Country province',
subLabel: 'Part of the country you live in'
}
]
}
]
```

Would generate 4 dropdowns. Or if not that somehow partially generate a schema, or supply a schema after blitz-form init (EG passing an empty form object) wrapping it over some non-form components and then supply the schema from inside those components.

E.G

```js





```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.