Enable option for gradual expanding of large children arrays #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
angular-tree-control has good performance on large data-sets partially because it onlyrenders children when the parent is toggled open. But it is very slow when a parent has many children (I have on the order of 500 in some instances). On top of that, when I use ng-include for each of the children labels, it causes the browser to freeze for >5 seconds while angular is compiling all 500 of the children nodes
This commit adds a 3 extra options that allow for better rendering. They are turned off by default so original behavior remains the default. The 3 options are:
For Example, if these were the option values:
when a parent node is expanded, it will append 10 children nodes every 10 ms. This will not freeze the screen, and allow the user to still interact with stuff while the children are being added.
I call it enableIntervalToggle because it adds children nodes on an interval when the parent is toggled open.