gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 370 forks source link

Nested arrays: when up/down bottons are pressed, all items get the same value #559

Open christoph007 opened 7 years ago

christoph007 commented 7 years ago

This is a simplified version of example 12 on http://www.alpacajs.org/docs/fields/array.html

$("#field12").alpaca({
    "schema": {
        "title": "Level1",
        "type": "array",
        "items": {
            "title": "Level2",
            "type": "array",
            "items": {
                "type": "string",
                "enum": ["five", "six", "seven", "eight"]
            }
        }
    }
});

When I create two items in Level 2 with different values and press the down button, both items end up with the same value.

When the enum is removed, one of the two values gets deleted.