You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not 100% sure if this is a bug or not. To me it seems the expanded/collapsed state and existence of children are independent state-like properties of a parent node, so doing this in your example code at least 'fixes' the issue for this case:
public void deleteChildren(UUID parent) {
var children = this.childMap.get(parent);
if (children == null || children.isEmpty()) {
return;
}
children.clear();
this.collapse(parent); // <-- collapse the parent node
this.getDataProvider().refreshItem(parent, true);
}
Description of the bug
TreeGrid#getDataProvider().refreshItem(parent, true); does not remove expanded state if item does not have any children anymore.
Used Dataprovider: AbstractBackEndHierarchicalDataProvider
Expected behavior
Remove expanded state for item after TreeGrid#getDataProvider().refreshItem(parent, true) if item does not have any children anymore.
Minimal reproducible example
Versions
The text was updated successfully, but these errors were encountered: