Skip to content

Commit 0b69cad

Browse files
committed
docs: address formatting comments
1 parent 0fdb2e7 commit 0b69cad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/vaadin/demo/component/treegrid/TreeGridScrollToItem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.vaadin.flow.component.html.Div;
77
import com.vaadin.flow.component.select.Select;
88
import com.vaadin.flow.component.treegrid.TreeGrid;
9+
import com.vaadin.flow.data.provider.hierarchy.HierarchicalDataProvider;
910
import com.vaadin.flow.data.provider.hierarchy.TreeData;
1011
import com.vaadin.flow.data.provider.hierarchy.TreeDataProvider;
1112
import com.vaadin.flow.router.Route;
@@ -21,7 +22,8 @@ public TreeGridScrollToItem() {
2122
TreeData<Person> treeData = new TreeData<>();
2223
treeData.addItems(DataService.getManagers(),
2324
manager -> DataService.getPeople(manager.getId()));
24-
treeGrid.setDataProvider(new TreeDataProvider<>(treeData));
25+
treeGrid.setDataProvider(new TreeDataProvider<>(treeData,
26+
HierarchicalDataProvider.HierarchyFormat.FLATTENED));
2527
treeGrid.addHierarchyColumn(Person::getFullName).setWidth("300px")
2628
.setFlexGrow(0).setHeader("Full name");
2729
treeGrid.addColumn(Person::getEmail).setHeader("Email");

0 commit comments

Comments
 (0)