Do not reload items for empty trash action
This was causing that 2 requests were fired and potentially could create a race condition [MAILPOET-3044]
This commit is contained in:
committed by
Veljko V
parent
3fbbf3db6d
commit
ec57ac32c6
@@ -381,7 +381,10 @@ class Listing extends React.Component {
|
||||
action: 'bulkAction',
|
||||
data,
|
||||
}).done(() => {
|
||||
this.getItems();
|
||||
const isEmptyTrashAction = selectedIds === 'all' && params.group === 'trash' && params.action === 'delete';
|
||||
if (!isEmptyTrashAction) {
|
||||
this.getItems();
|
||||
}
|
||||
}).fail((response) => {
|
||||
if (response.errors.length > 0) {
|
||||
this.context.notices.error(
|
||||
|
Reference in New Issue
Block a user