Tree is not rendering
See original GitHub issueHi there, I don’t know why the tree is just render root, the children are not on version 6.0.1 and up. It works well on v3.2.3. Could you please help to check?
- This is my code: import { Component, OnInit, OnChanges } from ‘@angular/core’; import { ITreeOptions } from ‘angular-tree-component’;
declare var require: any;
@Component({
selector: ‘app-async’,
template: <tree-root #tree [options]="options" [nodes]="nodes"></tree-root>
,
styles: []
})
export class StartPageComponent implements OnInit {
ngOnInit() {
}
options: ITreeOptions = {
getChildren: this.getChildren.bind(this)
};
nodes: any[] = [];
asyncChildren = [
{
name: 'child1',
hasChildren: true
}, {
name: 'child2'
}
];
constructor() {
this.nodes = [
{
name: 'root1',
children: [
{ name: 'child1' }
]
},
{
name: 'root2',
hasChildren: true
},
{
name: 'root3'
}
];
}
getChildren(node: any) {
const newNodes = this.asyncChildren.map((c) => Object.assign({}, c));
return new Promise((resolve, reject) => {
setTimeout(() => resolve(newNodes), 1000);
});
}
}
- It renders as bellow:
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How To Fix Trees NOT Rendering/Loading In Fortnite ...
How To Fix Trees NOT Rendering /Loading In Fortnite! (Chapter 3)You may have noticed that Tree's are glitched while using the Performance ...
Read more >tree does not render nodes · Issue #479 - GitHub
hello, im using the basic example on my Nextjs project only thing i added is NoSsr component to prevent server side rendering (otherwise...
Read more >Why blender doesn't render my trees
I created this particle plane with trees, but when I render cycles or eevee it doesn't render trees. What I could do? enter...
Read more >Trees not rendering : r/CODWarzone - Reddit
Trees not rendering. Hello everyone. I'm having an issue with ingame textures. For context im playing on PC, on a 5800x + 6800XT, ......
Read more >Trees and plants are not rendering in the viewer
Hi,. Since the latest update to Twinmotion, my trees and plants are not displaying properly in the viewer. When I render them they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sure you have imported the stylesheet in your main styles.scss or equivalent:
@import "~angular-tree-component/dist/angular-tree-component.css";
I have the same problem and i added the css import also but still continue to have the problem. But for me the import line is @import ‘~@circlon/angular-tree-component/css/angular-tree-component.css’; and not @import ‘~@circlon/angular-tree-component/dist/angular-tree-component.css’; since dist is not an available location in the library. I don’t know if that makes a difference though