Skip to content

Commit 22859fa

Browse files
ugur-vaadinvursen
andcommitted
Update articles/components/tree-grid/index.adoc
Co-authored-by: Sergey Vinogradov <[email protected]>
1 parent da4d9a9 commit 22859fa

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

articles/components/tree-grid/index.adoc

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,7 @@ include::{root}/src/main/java/com/vaadin/demo/component/treegrid/TreeGridScrollT
144144
----
145145
--
146146

147-
`TreeDataProvider` supports this feature out of the box. For other data providers, you will need to implement [methodname]#getParent(T item)# and [methodname]#getItemIndex(T item, HierarchicalQuery query)#.
148-
149-
=== Scrolling to an Item by Path
150-
151-
To use this feature, you need to specify the path of the item you want to view. The scroll position of the grid is adjusted to bring that item into view.
152-
153-
In contrast to scrolling to an item, possible collapsed parents of the item do not expand before scrolling.
154-
155-
[.example]
156-
--
157-
[source,typescript]
158-
----
159-
include::{root}/frontend/demo/component/tree-grid/tree-grid-imports.ts[preimport,hidden]
160-
----
161-
162-
[source,java]
163-
----
164-
include::{root}/src/main/java/com/vaadin/demo/component/treegrid/TreeGridScrollToItem.java[render,tags=snippet,indent=0]
165-
----
166-
--
167-
168-
To use this feature, the data provider needs to implement [methodname]#getParent()# and [methodname]#getItemIndex()#.
147+
`TreeDataProvider` supports this feature out of the box. For other data providers, you need to implement [methodname]#getParent(T item)# and [methodname]#getItemIndex(T item, HierarchicalQuery query)#.
169148

170149
=== Scrolling to an Item by Path
171150

0 commit comments

Comments
 (0)