Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Asynchronous filling the timeline results in an empty timeline #2

Open
geoffreyvd opened this issue Apr 22, 2017 · 7 comments
Open
Assignees
Milestone

Comments

@geoffreyvd
Copy link

As the title says: when i fill the timeline with elements at an asynchronous time, the timeline will not render.
any ideas?

@shalugin
Copy link
Owner

I think it's because component fills only in ngAfterViewInit.

@sggonzalezg
Copy link

I'm having the same problem.

@geoffreyvd
Copy link
Author

I fixed it, will push or create a PR tonight or PM me if u need it fast

@sggonzalezg
Copy link

Please 🙏

@geoffreyvd
Copy link
Author

@sggonzalezg
ngAfterViewChecked(): void { console.log(" after view is triggerd"); if(this.isInputChanged){ if (this.timelineElements && this.timelineElements.length) { for (let i = 0; i < this.timelineElements.length; i++) { if (this.timelineElements[i].selected) { this.selectedIndex = i; break; } } this.initTimeline(this.timelineElements); } } this.isInputChanged = false; }

and implement afterviewchecked

@geoffreyvd
Copy link
Author

@sggonzalezg did it work?

@sggonzalezg
Copy link

sggonzalezg commented May 11, 2017

@geoffreyvd

Sorry, I don't know hot to do that.
I'm new in this.
Can you explain to me step by step?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants