Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Timeline - Nested groups do not use groupOrder. #2810

Closed
frankisans opened this issue Mar 1, 2017 · 2 comments
Closed

Timeline - Nested groups do not use groupOrder. #2810

frankisans opened this issue Mar 1, 2017 · 2 comments

Comments

@frankisans
Copy link
Contributor

ItemSet.prototype._orderGroups use grupOrder option to sort all the groups (top groups and nested groups) but then _orderNestedGroups get the nested groups without applying order.

Maybe its enough to change:

       var nestedGroups = this.groupsData.get({
          filter: function filter(nestedGroup) {
            return nestedGroup.nestedInGroup == groupId;
          }
        });

to force the order again when geting nested groups:

       var nestedGroups = this.groupsData.get({
          filter: function filter(nestedGroup) {
            return nestedGroup.nestedInGroup == groupId;
          },
          order: this.optios.groupOrder
        });

We can even define a specific option nestedGroupOrder for sorting nested groups and use groupOrder if it is not defined.

In terms of performance, the first ordering of _orderGroups could be optimized to not include nested groups.

@frankisans frankisans changed the title Timeline - Nested groups do not use groupOrder. They keep the order of nestedGroups array. Timeline - Nested groups do not use groupOrder. Mar 1, 2017
@eanugent
Copy link

eanugent commented Mar 1, 2017

Thanks for posting this issue. I'm not able to get my nested groups to sort in any order other than by the id

@brichbe
Copy link

brichbe commented Mar 3, 2017

Relates to #2676

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

No branches or pull requests

6 participants