user1167253
user1167253

Reputation: 833

Vaadin Flow Grid. scroll to item programmatically

After selecting an item programmatically I want to scroll to them.

How can I scroll to selected item programmatically in Vaadin 10?

I did not found any method to do this.

Upvotes: 3

Views: 1956

Answers (1)

Tatu Lund
Tatu Lund

Reputation: 10633

This feature has not been implemented yet, there is feature request here

https://github.com/vaadin/vaadin-grid-flow/issues/289

But it is possible to do this with JavaScript call, e.g. like this

UI.getCurrent().getPage().executeJavaScript("$0._scrollToIndex($1)", grid, row)

Threre is more discussion here: https://vaadin.com/forum/thread/17215099

Upvotes: 4

Related Questions