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

Resource render hooks example has error causing "resource.id is undefined" #5341

Closed
SelectSystemsInternational opened this issue Apr 8, 2020 · 5 comments
Assignees

Comments

@SelectSystemsInternational

V5 Beta - Example - resource-render-hooks.html
Seems it can not access the id of the resource ?
resource.id is UNDEFINED
resource-render-hooks

@acerix
Copy link
Member

acerix commented Apr 8, 2020

The content injection argument is not the resource itself but an object with the resource in it:

https://codepen.io/acerix/pen/gOaYVjb?editors=0010

@acerix acerix closed this as completed Apr 8, 2020
@SelectSystemsInternational
Copy link
Author

Thanks, dont forget to fix your example

  resourceLabelContent: function(arg) {
    return 'Auditorium ' + ('' + arg.resource.id).toUpperCase();
  },

@acerix acerix changed the title resource.id is UNDEFINED Resource render hooks example has error causing "resource.id is undefined" Apr 8, 2020
@acerix
Copy link
Member

acerix commented Apr 8, 2020

Thanks, I was looking at the wrong page and didn't see that example.

https://github.com/fullcalendar/fullcalendar/blob/master/examples/resource-render-hooks.html#L43

@arshaw
Copy link
Member

arshaw commented Apr 10, 2020

thanks, i'll include this fix

@arshaw
Copy link
Member

arshaw commented Apr 14, 2020

this is now fixed in resource-render-hooks.html. thanks

@arshaw arshaw closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants