In the 5.5.3 version of the Gantt and Scheduler Pro components, we used a ResourceStore that is grouped by a departmentDescription field, however all records also have a sortOrder field, which we used to sort by. We did this using the groupSortFn config:
The config is still available and the groupSortFn still works. But previously it was possible to sort on other values than just the field that is grouped by. So we have resource records that have both a departmentdescription field, and a sortorder field. We group by the departmentdescription, but sort the groups by sortorder. And in version 5.5.3, this worked. But in version 6.1.6 the extra fields are no longer available in the models passed to the groupsort function.
The way to reproduce it would be to have resources with at least 2 different fields, try to group by 1 of the fields, and sort by a different field.
I couldn't find a demo project with a grouped histogram to reproduce this in.
The resourcestore and records absolutely have those extra fields. But it seems like the groupSort function is given some sort of group header object which does not have all of the fields that the resources have.
The picture below may help illustrate the issue. I made the extra fields visible in the grid. The records have the extra fields, however the group headers do not. And in the sort function I only have the group header records after the update. In the olf version the other fields were also available.
Screenshot 2025-03-14 085455.png (47.71 KiB) Viewed 765 times
Re: Sorting a grouped resourcestore
Posted: Fri Mar 14, 2025 11:09 am
by peter4ef
I found a way around this issue. The group children are available, so I look up the requires properties of the department record using the groupChildren property:
And I think this is also how it is supposed to work, since I was sorting on properties we specifically added to the children in order to influence the sorting of the groups. It was just a bit hard to find the right properties.
Thanks for your response. But our current code is a workable solution for what we need. It behaves the way we want, and I am not seeing any performance issues.
Re: Sorting a grouped resourcestore
Posted: Fri Mar 14, 2025 11:26 am
by alex.l
Yep, we just need to fix docs to make it more clear and consistent.