Grid MultiSelect not updated with DataProvider refreshed.

I have a grid that is loaded from a list using the ListDataProvider.

The grid is in multi select mode.

When I use the selection model to delete selected models I call refreshAll on the ListDataProvider.

The problem is that the selection model doesn’t appear to be updated when I call refreshAll and as a result still contains the (now deleted) rows.

To fix the problem I had to manually update the selection model which seems wrong.

To wit:

private Grid<ActivityLine> grid;
private ListDataProvider<ActivityLine> activityProvider;
private List<ActivityLine> activityLines;

grid = new Grid<>();

activityLines = activities.parallelStream().sorted().map(t -> new ActivityLine(t))
activityProvider = new ListDataProvider<>(activityLines);

// delete handler

    private void deleteActivities()
        MultiSelect<ActivityLine> selections = this.grid.asMultiSelect();
        selections.getValue().parallelStream().forEach(line -> {
            new ActivityDao().delete(line.getActivity());
            // I wasn't expecting to need this line.

            selections.updateSelection(new HashSet<ActivityLine>(), Stream.of(line).collect(Collectors.toSet()));

This sounds like a clear bug case. Could you file this as an issue in GitHub