Skip to content

Retrieve tree sorting by something other than default order #85

@dmaksimov

Description

@dmaksimov

Would it be possible to have a way to pull the tree of nodes but sort it by another column.

Sometimes I need to pull all the nodes into an array but also order it alphabetically by the node's name.

I know I can use the toTree method, but having it all in one collection would be easier since I wouldn't have to recursively iterate through the children.

So the result would look something like the following.

  • A parent
  • - A child
  • - B Child
  • - C child
  • B Parent
  • - F child
  • - - A child
  • - - B Child
  • - G child
  • M Parent
  • - A child
  • - N child
  • - O Child

So it would still pull the child nodes after the parent, but the child nodes under that parent would be in alphabetical order. The parents would also be in alphabetical order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions