Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule control not showing events #6154

Closed
pserafin opened this issue Jul 25, 2018 · 3 comments
Closed

Schedule control not showing events #6154

pserafin opened this issue Jul 25, 2018 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@pserafin
Copy link

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

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

@arquadrado
Copy link

Same problem here!

@bellizio
Copy link

bellizio commented Aug 9, 2018

I have just encountered the same problem.

Also seeing a similar issue where events will not be shown if the <p-schedule> component is wrapped with an *ngIf condition, regardless if the data is async or not.

@cagataycivici cagataycivici self-assigned this Aug 29, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 29, 2018
@cagataycivici cagataycivici added this to the 6.1.3 milestone Aug 29, 2018
@cagataycivici
Copy link
Member

PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants