Skip to content

expandedListItems and internal state #4

@efeminella

Description

@efeminella

The expandedListItems prop should allow for setting the initial expanded items within the list, after which, the Tree should be able to handle expanding / contracting items as expected.

For instance, a typical use-case would be to allows clients (User's of the API) to handle persist the expandedListItems at the application level in redux state (e.g. via refs to tree.state.expandedListItems on, say, componentWillUnmount), and be able to pass the persisted expanded list items as the initial expanded list items, and have the Tree function as expected from there on, and rinse and repeat.

Currently, in order to expand the tree to a given node(s), using expandedListItems requires User's to manage the state of the Tree's expanded / contracted nodes completely, which I can't imagine would be desirable.

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