Skip to content

add option for moveUnderParent to specify "last" index #4

@riexn

Description

@riexn

atIndex option currently accepts numbers only.
To remove the hassle of finding the parent again, to get its children length, and use it to find the last length,
It's better to just mention atIndex: "LAST"

goal:

tree.moveUnderParent({
    node: (node) => node.model._id === "A",
    toParent: (node) => node.model._id === "B",
    atIndex: "LAST",
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions