Skip to content

Group are not flexible enough #259

Closed
@lionel-bijaoui

Description

@lionel-bijaoui

Hello @icebob @jmverges @dflock
I'm late to the party and I didn't really follow the work on groups.
Since working on #257 , I'm exposed to how group work and I have noticed a flaw in the current design.
I can't alternate freely between single field and group.
The only possibility is fields -> groups. I can't do the inverse (ex. groups -> fields) or anything else (ex. field -> group -> field -> group -> group -> field)
My goal is not to spit on everyone hard work, but I wonder if they can be a better more flexible way to do this.
Why a type: group was not used ?

fields: [{
    type: "input",
    inputType: "text",
    label: "Single field (without group)",
    model: "single"
}, {
    type: "group",
    legend: "Contact Details",
    fields: [{
        type: "input",
        inputType: "text",
        label: "Name",
        model: "name"
    }, {
        type: "input",
        inputType: "email",
        label: "Email",
        model: "email"
    }]
}, {
    type: "group",
    legend: "Other Details",
    fields: [{
        type: "input",
        inputType: "text",
        label: "More",
        model: "others.more"
    }, {
        type: "input",
        inputType: "text",
        label: "Things",
        model: "others.things"
    }]
}]

Thanks for the feedback.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions