Skip to content

Add the ability to reload async child nodes #279

Open
@grapoza

Description

@grapoza

Spawned from the conversation in #278

It would be useful to have the ability to easily reload the children of a node of those children were loaded through an async callback. For example, if a list of items was loaded from a server and a client only knew that something changed but did not have enough information to add a specific new node then a full reload would be required.

The behavior would be similar to the following manual process:

  1. set the node's expanded property to false
  2. set the children list to [] (probably not necessary, but why not clean up after ourselves)
  3. set the internal model.treeNodeSpec._.state.areChildrenLoaded property to false
  4. set the node's expanded property to true again to re-trigger the async load (after Change expanding behavior to trigger from a watch on the expanded attribute #280)

This could be exposed through a function and should probably honor the parent node's current expanded state (though of course the state of children would be lost, since they're getting reloaded).

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