Hi,
I have problems with the callback-function of the expandPath-function.
Is it possible that this callback-function is not executed, when the path-Array (first parameter of the expandPath-function) is [0]?
What i am trying to implement is when a new child-item is created then the parent-item should be reloaded and after that the new child-item should be selected.
This works fine, only when this new item is child of the root-item (with id 0) the callback-function, which selects the item, is not executed.
Can someone give me some advice?
Regards,
Xaver
I have problems with the callback-function of the expandPath-function.
Is it possible that this callback-function is not executed, when the path-Array (first parameter of the expandPath-function) is [0]?
What i am trying to implement is when a new child-item is created then the parent-item should be reloaded and after that the new child-item should be selected.
This works fine, only when this new item is child of the root-item (with id 0) the callback-function, which selects the item, is not executed.
var parentItem = wpTreeView.dataSource.get(parentId);parentItem.expanded = false;parentItem.loaded(false);parentItem.hasChildren = true;wpTreeView.expandPath([parentId], function () { var newItem = wpTreeView.dataSource.get(data.Id); var newListItem = wpTreeView.findByUid(newItem.uid); console.log(newListItem); wpTreeView.select(newListItem);});Can someone give me some advice?
Regards,
Xaver