Schedule control not showing events #6154
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Current behavior
Control won't show/print events unless they are loaded with some delay (caused by e.g. service call to retrieve data) on ngOnInit() action or any action which will take place after control view initialization eg ngAfterViewInit()
Expected behavior
filling events with some initial data on ngOnInit() e.g.
ngOnInit() { this.events = [ { title : 'event1', start : '2018-01-24', }; }
should result with printing them on layout
Minimal reproduction of the problem with instructions
Just replace:
ngOnInit() { this.eventService.getEvents().then(events => {this.events = events;}); }
with some flat initialization
ngOnInit() { this.events = [ { title : 'event1', start : '2018-01-24', }; }
it will cause not printing that that event on layout.
changing place of events initialization to e.g. ngAfterViewInit() - fixing this issue
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Tested on current version from github (6.0.1)
Angular version: 5.X
6
PrimeNG version: 5.X
6.0.1
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
checked on all newest versions of Edge/Firefox/Chrome
Language: [all | TypeScript X.X | ES6/7 | ES5]
languages: pl/en , Typescript 2.7.2, ES6
The text was updated successfully, but these errors were encountered: