BasicPrimitives/react

Cannot set properties of undefined (setting 'id') in OrgItemConfig()

iFlameDev opened this issue · 1 comments

Hi all, I found a confusing issue inside OrgItemConfig

image
this is where I create the OrgItemConfig object

image
and this is the result in the console log

image
on the 6.5.1 version inside React project

I don't have any idea about this error, please help me.

You have to use new OrgItemConfig(arguments ....) construct or provide a regular JSON objects instead.

control.setOptions({"items", [
    new primitives.OrgItemConfig({
        id: 0,
        parent: null,
        title: "James Smith",
        description: "VP, Public Sector",
        image: "../images/photos/a.png"
    }),
    new primitives.OrgItemConfig({
        id: 1,
        parent: 0,
        title: "Ted Lucas",
        description: "VP, Human Resources",
        image: "../images/photos/b.png"
    }),
    new primitives.OrgItemConfig({
        id: 2,
        parent: 0,
        title: "Fritz Stuger",
        description: "Business Solutions, US",
        image: "../images/photos/c.png"
    })
]
});