Select row in Grid after refresh

I have a grid with single selection, and i want to keep the selected item selected after setting new items.
Im trying something like this:

Optional opt = grid.getSelectedItems().stream().findFirst();
grid.setItems( items );
opt.ifPresent( item -> item ) )  ;

But then, i cannot ‘deselect’ the row in the client.
any suggestions? ._.

just updated to 8.1.4 ( from 8.0.7 ) and now its working =D