framework icon indicating copy to clipboard operation
framework copied to clipboard

TreeGrid.scrollTo(int) always throws an exception

Open mvysny opened this issue 9 years ago • 3 comments

Vaadin 8.1.0-beta2:

Caused by: java.lang.IllegalArgumentException: Hierarchical data provider doesn't support non-hierarchical queries
	at com.vaadin.data.provider.HierarchicalDataProvider.size(HierarchicalDataProvider.java:51)
	at com.vaadin.ui.Grid.scrollTo(Grid.java:3714)

mvysny avatar Jun 25 '17 07:06 mvysny

+1 on this. This is a hard bug.

sabesoft-jeff avatar Aug 28 '17 18:08 sabesoft-jeff

You can override the scrollTo method as a hotfix:

    @Override
    public void scrollTo(int row, ScrollDestination destination) {
        Objects.requireNonNull(destination,
                "ScrollDestination can not be null");

        getRpcProxy(GridClientRpc.class).scrollToRow(row, destination);
    }

Hedath avatar Aug 30 '17 07:08 Hedath

This issue is fixed in https://github.com/vaadin/framework/pull/10005

wbadam avatar Sep 23 '17 05:09 wbadam