refresh list after deleting report

This commit is contained in:
f43nd1r 2018-07-19 19:30:07 +02:00
parent da4fda7cae
commit aa4610ef39

View file

@ -55,7 +55,10 @@ public class ReportList extends MyGrid<Report> {
if (SecurityUtils.hasPermission(app, Permission.Level.EDIT)) {
ButtonRenderer<Report> renderer = new ButtonRenderer<>(e -> new Popup().setTitle("Confirm")
.addComponent(new Label("Are you sure you want to delete this report?"))
.addYesNoButtons(p -> reportDeleter.accept(e.getItem()), true)
.addYesNoButtons(p -> {
reportDeleter.accept(e.getItem());
getDataProvider().refreshAll();
}, true)
.show());
renderer.setHtmlContentAllowed(true);
addColumn(report -> VaadinIcons.TRASH.getHtml(),