Comments (6)
@Freakazo could you tell me roughly how big your tree is?
from react-infinity-menu.
The intent is to add in total roughly a hundred leaf nodes, would that be a problem?
I should have specified, the controlItems in the tree above is defined as
let controlItems = [
<ControlItem/>,
]
I get the same error when using something like a Hello react component instance.
The full tree is below as used is below, no adding of leaf nodes at the moment.
this.state = {
tree: [
{
name: "controls", /*require*/
id: 0, /*require*/
isOpen: false, /*require*/
customComponent: ControlManage,
controlItems: controlItems
},
{
name: "Dementia",
id: 1,
isOpen: false,
customComponent: ControlIcon,
icon: "transform",
depth: 0,
children: [
{
id: 0,
name: "Any",
value: "ALL",
customComponent: Select,
onSelect: this.handleDementiaClick
},
{
id: 1,
name: "Dementia Only",
value: "YES",
customComponent: Select,
onSelect: this.handleDementiaClick
},
{
id: 2,
name: "Non Dementia Only",
value: "NO",
customComponent: Select,
onSelect: this.handleDementiaClick
},
]
},
{
name: "Regions",
id: 3,
isOpen: false,
customComponent: ControlIcon,
icon: "layers_clear",
depth: 0,
children: []
},
{
name: "Sizes",
id: 4,
isOpen: false,
customComponent: ControlIcon,
icon: "aspect_ratio",
depth: 0,
children: []
}
]
};
from react-infinity-menu.
a hundred leaf nodes should be fine. deep copy is slow, but I don't see why will causing your problem. Deep copy here mainly for usage of search
from react-infinity-menu.
It might be because of a circular reference inside a react component that deep-copy doesn't handle.
Would changing the copy library from deep-copy to the much more popular deepcopy be welcome?
That's if it actually solves the original issue and has no other side effects.
If so I will spend some time testing it and submit a pull request.
https://www.npmjs.com/package/deepcopy
https://www.npmjs.com/package/deep-copy
from react-infinity-menu.
@Freakazo that sounds like an acceptable solution!
from react-infinity-menu.
this should be resolved
from react-infinity-menu.
Related Issues (19)
- Remove immutable js
- inline default style
- Having trouble with search HOT 11
- Update component while searching HOT 8
- too many leaves HOT 2
- IE11 compatibility HOT 1
- Is there a way to add animation? HOT 2
- in "onLeafMouseClick", an "data-reactid" of the leaf is passed in instead of the "leaf" object when using customComponent for leaf HOT 5
- remove full lodash dependency
- Uncaught TypeError: _react2.default.unmountComponentAtNode is not a function HOT 4
- No newest version (V 3.2.0) found in NPM HOT 1
- Search functionality not working as expected with numeric values HOT 4
- Custom component as leaf in main menu level HOT 1
- menu element onClick- bold HOT 1
- invariant violation HOT 1
- css file not import HOT 2
- Can we default the placeholder for search instead of being empty?
- Open Source this HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-infinity-menu.