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

Timeline - Nested groups do not use groupOrder.  #2810

@frankisans

Description

@frankisans

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions