Skip to content

"tag" not working with grouped schema #331

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

Closed
webdevnerdstuff opened this issue Nov 2, 2017 · 2 comments · Fixed by #332
Closed

"tag" not working with grouped schema #331

webdevnerdstuff opened this issue Nov 2, 2017 · 2 comments · Fixed by #332

Comments

@webdevnerdstuff
Copy link

Node: version 8.9.0
VGG: version 2.1.1

Problem
Adding tag="div" still uses fieldset when the schema has grouped fields.

Example:

<vue-form-generator 
 :model="model" 
 :schema="fields" 
 :options="formOptions" 
 ref="someForm" 
 tag="div" 
 >
 </vue-form-generator>

This works with a regular schema.

Ex. (works)

schema: {
    fields: [
        {
            type: 'input',
            inputType: 'input',
            label: 'First Name',
        },
        {
            type: 'input',
            inputType: 'input',
            label: 'Last Name',
        },
    ],
}

With a grouped schema it does not work.

Ex. (does not work)

schema: {
    groups: [
        {
            fields: [
                {
                    type: 'input',
                    inputType: 'input',
                    label: 'First Name',
                },
            ],
        },
        {
            fields: [
                {
                    type: 'input',
                    inputType: 'input',
                    label: 'Last Name',
                },
            ],
        },
    ],
}

Expected Outcome
When adding tag to VFG and having grouped fields, it will change fieldset to the tag specified.

@hansi90 hansi90 mentioned this issue Nov 3, 2017
@webdevnerdstuff
Copy link
Author

Awesome. Thank you!

@gezichenshan
Copy link
Contributor

Where can I read the documentation about tag?

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

Successfully merging a pull request may close this issue.

2 participants