Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide data for tree view does not work still not working #118

Closed
ghost opened this issue Feb 20, 2017 · 4 comments
Closed

provide data for tree view does not work still not working #118

ghost opened this issue Feb 20, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 20, 2017

Type Error: this.props.data.map is not a function

@bencripps
Copy link
Owner

Thanks for posting the issue. This is a duplicate issue of #109 which has been resolved. Will be released as a patch version today.

@ghost
Copy link
Author

ghost commented Feb 21, 2017

Hi, still encountering the same issue

@ghost
Copy link
Author

ghost commented Feb 21, 2017

render() {
const stateKey = 'tree';
const treeConfig = {
stateKey: 'tree-grid-1',
gridType: 'tree', // either tree or grid,
showTreeRootNode: false, // dont display root node of tree
plugins,
columns: [
{
dataIndex: 'category',
name: 'Category',
expandable: true // this will be the column that shows the nested hierarchy
},
{
dataIndex: 'categoryCode',
name: 'Category Code',
expandable: true // can be set on multiple columns
},
{
dataIndex: 'editable',
name: 'Editable',
expandable: false // will be displayed as flat data
}
],
data: {
"data" : {
"root" : {
"id" : -1,
"Name" : "Root",
"children" : [{
"id" : 1,
"parentId" : -1,
"Name" : "Category 1",
"GUID" : "8f7152dc-fed7-4a65-afcf-527fceb99865",
"Email" : "hgardnero6@ed.gov",
"Gender" : "Male",
"Address" : "605 Manley Park",
"Phone Number" : "31-(678)495-4134",
"children" : [{
"id" : 11,
"parentId" : 1,
"Name" : "Category 11",
"GUID" : "8f7152dc-fed7-4a65-afcf-527fceb991865",
"Email" : "hgardneross6@ed.gov",
"Gender" : "Male",
"Address" : "12 Manley Park",
"Phone Number" : "31-(678)495-4134"
}, {
"id" : 12,
"parentId" : 1,
"Name" : "Category 12",
"GUID" : "8f7152dc-fed7-4acf-527fceb991865",
"Email" : "hgardneross6@ed.gov",
"Gender" : "Male",
"Address" : "12 Manley Park",
"Phone Number" : "31-(678)495-4134",
"children" : [{
"id" : 121,
"parentId" : 12,
"Name" : "Category 121",
"GUID" : "8f7q2dc-fedsss7-4acf-527fceb991865",
"Email" : "hgoss6@eds.gov",
"Gender" : "Male",
"Address" : "21 fake Park",
"Phone Number" : "31-(678)495-4134"
}, {
"id" : 122,
"parentId" : 12,
"Name" : "Category 122",
"GUID" : "8f7q2dc-fed7-4acf-527fceb991865",
"Email" : "hgoss6@ed.gov",
"Gender" : "Male",
"Address" : "21 fake Park",
"Phone Number" : "31-(678)495-4134",
"children" : [{
"id" : 1221,
"parentId" : 122,
"Name" : "Category 1211",
"GUID" : "8f7q2dc-facf-527fceb991865",
"Email" : "hgossjdjdjdj6@ed.gov",
"Gender" : "Male",
"Address" : "21 fdjdjake Park",
"Phone Number" : "31-(678)495-4134"
}
]
}
]
}
]
}, {
"id" : 2,
"parentId" : -1,
"Name" : "Category 2",
"GUID" : "8f7q2dc-facf-527fcebdk=-jdjd991865",
"Email" : "hehehe@ed.gov",
"Gender" : "Male",
"Address" : "212 Park",
"Phone Number" : "31-(678)495-4134",
"children" : [{
"id" : 21,
"parentId" : 2,
"Name" : "Category 21",
"GUID" : "8f7q2dc-facf-527fcsw-jdjd991865",
"Email" : "hehehe@ed.gov",
"Gender" : "Male",
"Address" : "21112 Park",
"Phone Number" : "31-(678)495-4134",
"leaf" : false
}
]
}
]
}
}
},
stateKey
};

@ghost
Copy link
Author

ghost commented Feb 21, 2017

using this sample

@ghost ghost changed the title provide data for tree view does not work provide data for tree view does not work still not working Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant