-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists
Description
With Vaadin 24.3.3 and selection-grid-flow version 3.0.3 I sometimes see problems that the tree data is corrupted, for example child nodes are empty.
The below code reproduces the problem if you click the button and then expand the tree data, see also snapshot.
public class MainView extends VerticalLayout {
public MainView() {
SelectionTreeGrid<String> treeGrid = new SelectionTreeGrid<>();
treeGrid.addHierarchyColumn(String::toString);
TreeData<String> treeData = new TreeData<>();
for (int i = 1; i <= 10; i++) {
String topLevelItem = "Item " + i;
treeData.addItem(null, topLevelItem);
for (int j = 1; j <= 3; j++) {
String subItem = "Subitem " + (i * 10 + j);
treeData.addItem(topLevelItem, subItem);
for (int k = 1; k <= 3; k++) {
String subSubItem = "Subsubitem " + (i * 100 + j * 10 + k);
treeData.addItem(subItem, subSubItem);
}
}
}
treeGrid.setDataProvider(new TreeDataProvider<>(treeData));
Button button = new Button("Select Item", e -> {
treeGrid.scrollToItem("Subsubitem 512");
treeGrid.select("Subsubitem 512");
});
add(treeGrid, button);
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists