Skip to content

overriding open/close actions #11

@cantsin

Description

@cantsin

For this library to be more useful, we need a better way to control which nodes are visible from outside. Currently we use a list of openNodes and an on-open action to achieve this, but this is not ideal:

  • Relies on an undocumented action to control the list of open nodes.
  • If we want to open all children at once by using on-open, we implicitly assume children are already loaded.
  • Does not deal with the collapsing case unless we add a corresponding on-close action.
  • Has some API leakage. (see API leakage with the on-open action #8)
  • Need to accommodate a variety of use cases: open all children recursively; allow collapsing iff certain criteria are met.

Right now, actions are global in the sense that they are set per async-tree invocation. Should we make them per-node, perhaps? This might alleviate all of the problems above (sans documentation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions