Topic: MDBTreeview has error (version 4.27)
Nguyễn Văn Đô asked 4 years ago
Please check error on MDBTreeView:
index.js:1 Warning: Failed prop type: Invalid prop
children
of typearray
supplied to_n
, expectedobject
. in _n (at TreeviewPage.js:41) in TreeviewPage (created by Context.Consumer) in Route (at Routes.js:156) in Switch (at Routes.js:142) in Routes (at App.js:205) in main (at App.js:204) in div (at App.js:47) in Router (created by BrowserRouter) in BrowserRouter (at App.js:46)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.27.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Krzysztof Wilk staff commented 4 years ago
Hi!
Could you share your treeview code with me? I assume that you passed the array to the children prop, but it should be an object. Try to put your array into curly braces
Best regards