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

Lots of resources breaks the resource view order and doesnt append scrollbars to the bottom of the view #74

Closed
dizzleuk opened this issue Nov 28, 2015 · 13 comments
Milestone

Comments

@dizzleuk
Copy link

Hi having around 15 resources trying to be rendered in the resource view for this example:
http://fullcalendar.io/js/fullcalendar-scheduler-1.1.0-beta2/demos/agenda-views.html

using code like this:
resources: [
{ id: 'a', title: 'Room A' },
{ id: 'b', title: 'Room B', eventColor: 'green' },
{ id: 'c', title: 'Room C', eventColor: 'orange' },
{ id: 'd', title: 'Room D', eventColor: 'red' },
{ id: 'e', title: 'Room E' },
{ id: 'f', title: 'Room F', eventColor: 'green' },
{ id: 'g', title: 'Room G', eventColor: 'orange' },
{ id: 'h', title: 'Room H', eventColor: 'red' },
{ id: 'i', title: 'Room I' },
{ id: 'j', title: 'Room J', eventColor: 'green' },
{ id: 'k', title: 'Room K', eventColor: 'orange' },
{ id: 'l', title: 'Room L', eventColor: 'red' },
{ id: 'm', title: 'Room M', eventColor: 'red' },
{ id: 'n', title: 'Room N', eventColor: 'red' },
{ id: 'o', title: 'Room O', eventColor: 'red' }
],
will cause the following errors:

the resource headings are no longer in order a->z
scroll bars should be appended to the bottom when lots of resources are rendered

Hopefully this helps you
Best Regards

@dizzleuk dizzleuk changed the title Lots of resources breaks the resource view and doesnt append scrollbars to the bottom of the view Lots of resources breaks the resource view order and doesnt append scrollbars to the bottom of the view Nov 28, 2015
@arshaw
Copy link
Member

arshaw commented Dec 5, 2015

could you follow Bug Report Instructions and post a recreation in JSBin/JSFiddle ?

@arshaw arshaw closed this as completed Dec 5, 2015
@dizzleuk
Copy link
Author

dizzleuk commented Dec 6, 2015

Just take the example code in the full-calendar-scheduler "simple" here:
https://github.com/fullcalendar/fullcalendar-scheduler/blob/master/demos/simple.html
and multiply the number of resources added to the full calendar to around 15 or 20

@yokomizor
Copy link

I've noted that it is happening on Chrome and Opera. I've also tested on Safari, Firefox and IE11 and it works pretty well.

@yokomizor
Copy link

@yokomizor
Copy link

Implementing resourceOrder function seems to solve the problem:

resourceOrder: function (a, b) {
  return a.title < b.title ? -1 : a.title > b.title ? 1 : 0;
}

@arshaw
Copy link
Member

arshaw commented Dec 11, 2015

@dizzleuk i've created this fiddle: http://jsbin.com/yedapokide/1/edit?js,output

from what i can tell, in both Chrome and FF, without specifying the resourceOrder setting, the order of the resources is the order they were received, which is intended behavior. See docs

Adding a resourceOrder: 'title' option sorts by title

Knowing this information, @dizzleuk and @yokomizor , is there still a problem?

@yokomizor
Copy link

It seems to occur only using agendaDay view.

http://jsbin.com/hequzunagi/edit?js,output

@dizzleuk
Copy link
Author

yes i was also using the day view.

@arshaw
Copy link
Member

arshaw commented Dec 16, 2015

recreated, will fix.

there is a workaround if you simply want to sort by title, just set resourceOrder to "title"

@yokomizor
Copy link

Nice! Thank you.

@arshaw arshaw modified the milestone: 1.2.0 Dec 29, 2015
@arshaw arshaw closed this as completed in f838960 Jan 4, 2016
@arshaw
Copy link
Member

arshaw commented Jan 7, 2016

fixed in scheduler 1.2.0, released

@OliverDolan
Copy link

OliverDolan commented Feb 25, 2017

Is it possible this is still not working correctly?
http://jsbin.com/pijokucaci/edit?html,js,output

also adding resource order:
http://jsbin.com/doyawotiwo/edit?html,js,output

@arshaw
Copy link
Member

arshaw commented Mar 4, 2017

The fix was that if no resourceOrder is specified, it should render the resources in the order they were specified. This seems to be correctly happening in your first demo

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

No branches or pull requests

4 participants