Skip to content

"tag" not working with grouped schema #331

Closed
@webdevnerdstuff

Description

@webdevnerdstuff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions