There is a TextField
in which you enter the number of displayed items on one page of the DataGrid
. I tried to do this by setting an event listener on the TextField
like this:
textField.addValueChangeListener(e -> {
simplePagination.setItemsPerPageOptions(new ArrayList<Integer>() {{
add(e.getValue());
}});
simplePagination.setItemsPerPageDefaultValue(e.getValue());
dataGrid.execute();
});
But the SimplePagination
didn`t respond to this code. How to do it right?