modal select related sync mass remove
This commit is contained in:
@@ -281,7 +281,7 @@ class RelatedListModalView extends ModalView {
|
||||
this.waitForView('search');
|
||||
}
|
||||
|
||||
this.getCollectionFactory().create(this.scope, (collection) => {
|
||||
this.getCollectionFactory().create(this.scope, collection => {
|
||||
collection.maxSize = this.getConfig().get('recordsPerPage');
|
||||
collection.url = this.url;
|
||||
|
||||
@@ -297,6 +297,12 @@ class RelatedListModalView extends ModalView {
|
||||
panelModel.set(model.attributes);
|
||||
}
|
||||
});
|
||||
|
||||
this.listenTo(collection, 'after:mass-remove', () => {
|
||||
this.panelCollection.fetch({
|
||||
skipCollectionSync: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.setupSearch();
|
||||
|
||||
@@ -1418,6 +1418,8 @@ class ListRecordView extends View {
|
||||
Espo.Ui.success(this.translate(msg, 'messages').replace('{count}', count));
|
||||
});
|
||||
|
||||
this.collection.trigger('after:mass-remove');
|
||||
|
||||
Espo.Ui.notify(false);
|
||||
};
|
||||
|
||||
@@ -1463,6 +1465,8 @@ class ListRecordView extends View {
|
||||
}
|
||||
}
|
||||
|
||||
this.collection.trigger('after:mass-remove');
|
||||
|
||||
const msg = count === 1 ? 'massRemoveResultSingle' : 'massRemoveResult';
|
||||
|
||||
Espo.Ui.success(this.translate(msg, 'messages').replace('{count}', count));
|
||||
|
||||
Reference in New Issue
Block a user