Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 299
user1167253 Avatar asked Mar 26 '26 05:03

user1167253


1 Answers

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

like image 105
Tatu Lund Avatar answered Mar 28 '26 02:03

Tatu Lund



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!