Skip to content

array showing only first item #195

Open
@emilb604

Description

@emilb604

only first element is being displayed, console error:

ERROR TypeError: Cannot read property 'name' of undefined
at checkBindingNoChanges (core.js:9912)
at checkNoChangesNodeInline (core.js:13965)
at checkNoChangesNode (core.js:13935)
at debugCheckNoChangesNode (core.js:14764)
at debugCheckDirectivesFn (core.js:14666)
at Object.eval [as updateDirectives] (ConfigComponent.html:2)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:14648)
at checkNoChangesView (core.js:13773)
at callViewAction (core.js:14126)
at execEmbeddedViewsAction (core.js:14104)

Schema looks like following for array:

            "CurrentConfig" : {
                "type" : "object",
                "properties" : {
                    "fields" : {
                        "type" : "array",
                        "items" : {
                            "type" : "object",
                            "properties" : {
                                "name" : {
                                    "type" : "string",
                                    "title" : "name"
                                },
                                "showLabel" : {
                                    "type" : "boolean",
                                    "title" : "showLabel"
                                },
                                "showData" : {
                                    "type" : "boolean",
                                    "title" : "showData"
                                },
                                "label" : {
                                    "type" : "string",
                                    "title" : "label"
                                },
                                "displayStyle" : {
                                    "type" : "string",
                                    "title" : "displayStyle",
                                    "enum" : [ 
                                        "controls-vin-label", 
                                        "controls-vin-label2"
                                    ]
                                },
                                "display" : {
                                    "type" : "string",
                                    "title" : "display",
                                    "enum" : [ 
                                        "value", 
                                        "transValue"
                                    ]
                                },
                                "divClass" : {
                                    "type" : "string",
                                    "title" : "divClass",
                                    "enum" : [ 
                                        "current-data-sm", 
                                        "current-data-lg"
                                    ]
                                },
                                "transValueMIMEType" : {
                                    "type" : "string",
                                    "title" : "transValueMIMEType",
                                    "enum" : [ 
                                        "text/colour", 
                                        "image/jpg"
                                    ]
                                }
                            }
                        }
                    }
                }
            }       

data

 "CurrentConfig" : {
            "fields" : [ 
                {
                    "name" : "part",
                    "showLabel" : true,
                    "showData" : true,
                    "label" : "",
                    "displayStyle" : "controls-vin-label",
                    "display" : "value",
                    "divClass" : "current-data-sm",
                    "transValueMIMEType" : ""
                }, 
                {
                    "name" : "parentpart",
                    "showLabel" : true,
                    "showData" : true,
                    "label" : "BODY",
                    "displayStyle" : "controls-bodyno-label",
                    "display" : "value",
                    "divClass" : "current-data-reg",
                    "transValueMIMEType" : ""
                }, 
                {
                    "name" : "seqno",
                    "showLabel" : true,
                    "showData" : true,
                    "label" : "ASN",
                    "displayStyle" : "controls-asn-label",
                    "display" : "value",
                    "divClass" : "current-data-reg",
                    "transValueMIMEType" : ""
                }, 
                {
                    "name" : "partImage",
                    "showLabel" : false,
                    "showData" : true,
                    "label" : "",
                    "display" : "transValue",
                    "divClass" : "image-div",
                    "transValueMIMEType" : "image/jpg"
                }, 
                {
                    "name" : "extcolor",
                    "showLabel" : false,
                    "showData" : true,
                    "label" : "COLOUR",
                    "display" : "transValue",
                    "divClass" : "current-colour-box",
                    "transValueMIMEType" : "text/colour"
                }, 
                {
                    "name" : "ssn",
                    "showLabel" : true,
                    "showData" : true,
                    "label" : "SSN",
                    "display" : "value",
                    "divClass" : "current-data-reg",
                    "transValueMIMEType" : ""
                }
            ]
        },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions