Skip to main content


fires after an item has been expanded

afterExpand: (id: Id, dir?: TreeDirection) => void;


  • id: string | number - the id of an item which has been expanded
  • dir: string - optional, the side the children were shown in relation to the parent shape ("left" or "right" for type:"topic", otherwise - undefined)

Example"afterExpand", function(id, dir) {
console.log( + " was expanded", dir);

Change log:

The dir parameter has been added in v3.1.