Draggable / formeo

Drag & Drop Form Builder
http://draggable.github.io/formeo/
MIT License
534 stars 196 forks source link

Incorrectly loading saved form data #140

Closed dtorres-sf closed 6 years ago

dtorres-sf commented 6 years ago

I try to load a schema with 7 fields but instead it only loads 6 of the 7. Also the right hand column is in reverse order. Here is the output after loading:

image

And here is the schema that was loaded which should have 7 fields:

    "columns": {
        "19c1097a-f438-4fa1-807c-f2bfefca98ad": {
            "children": [
                "def7f158-8df5-4266-b972-fbcece64af49",
                "9e0099d8-bf34-4402-b948-5b65b46caeae",
                "1ca43485-3e2c-43a4-a17f-93389cbd17cd"
            ],
            "className": "f-column",
            "config": {
                "width": "50%"
            },
            "id": "19c1097a-f438-4fa1-807c-f2bfefca98ad"
        },
        "90215992-bbdc-4744-9b8f-04b398f69838": {
            "children": [
                "c4815461-6565-40b4-82cb-87e53ec710df",
                "65b379ae-ba28-480c-ac64-d8018577f176",
                "81b0f302-f825-4918-bc87-81977ad4df44",
                "31263ba0-461a-4f6f-8034-c8f97fdee6d5"
            ],
            "className": "f-column",
            "config": {
                "width": "50%"
            },
            "id": "90215992-bbdc-4744-9b8f-04b398f69838"
        }
    },
    "fields": {
        "1ca43485-3e2c-43a4-a17f-93389cbd17cd": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "3"
            },
            "id": "1ca43485-3e2c-43a4-a17f-93389cbd17cd",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "31263ba0-461a-4f6f-8034-c8f97fdee6d5": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "7"
            },
            "id": "31263ba0-461a-4f6f-8034-c8f97fdee6d5",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "65b379ae-ba28-480c-ac64-d8018577f176": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "5"
            },
            "id": "65b379ae-ba28-480c-ac64-d8018577f176",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "81b0f302-f825-4918-bc87-81977ad4df44": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "6"
            },
            "id": "81b0f302-f825-4918-bc87-81977ad4df44",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "9e0099d8-bf34-4402-b948-5b65b46caeae": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "2"
            },
            "id": "9e0099d8-bf34-4402-b948-5b65b46caeae",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "c4815461-6565-40b4-82cb-87e53ec710df": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "4"
            },
            "id": "c4815461-6565-40b4-82cb-87e53ec710df",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        },
        "def7f158-8df5-4266-b972-fbcece64af49": {
            "attrs": {
                "required": false
            },
            "conditions": [
                {
                    "if": [
                        {
                            "comparison": "",
                            "source": "",
                            "sourceProperty": "",
                            "target": "",
                            "targetProperty": ""
                        }
                    ],
                    "then": [
                        {
                            "assignment": "",
                            "target": "",
                            "targetProperty": "",
                            "value": ""
                        }
                    ]
                }
            ],
            "config": {
                "label": "1"
            },
            "id": "def7f158-8df5-4266-b972-fbcece64af49",
            "meta": {
                "group": "common",
                "icon": "textarea",
                "id": "textarea"
            },
            "tag": "textarea"
        }
    },
    "id": "4036a796-dd15-4b9f-ab05-b6c9c4a6261c",
    "rows": {
        "de50da1f-0cd1-47ec-8de2-a3dea00e7f3d": {
            "children": [
                "19c1097a-f438-4fa1-807c-f2bfefca98ad",
                "90215992-bbdc-4744-9b8f-04b398f69838"
            ],
            "className": [
                "f-row"
            ],
            "config": {
                "fieldset": false,
                "inputGroup": false,
                "legend": ""
            },
            "id": "de50da1f-0cd1-47ec-8de2-a3dea00e7f3d"
        }
    },
    "stages": {
        "5a226b0e-fd35-45fa-ac7a-98da8ff83a00": {
            "children": [
                "de50da1f-0cd1-47ec-8de2-a3dea00e7f3d"
            ],
            "id": "5a226b0e-fd35-45fa-ac7a-98da8ff83a00"
        }
    }
}
kevinchappell commented 6 years ago

confirmed, working on fix.

kevinchappell commented 6 years ago

resolved in #142