Merge pull request #20432 from shariquerik/avoid-list-refresh-fix
This commit is contained in:
commit
806df53222
2 changed files with 6 additions and 5 deletions
|
|
@ -54,12 +54,8 @@ context("List View", () => {
|
|||
method: "POST",
|
||||
url: "api/method/frappe.model.workflow.bulk_workflow_approval",
|
||||
}).as("bulk-approval");
|
||||
cy.intercept({
|
||||
method: "POST",
|
||||
url: "api/method/frappe.desk.reportview.get",
|
||||
}).as("real-time-update");
|
||||
cy.wrap(elements).contains("Approve").click();
|
||||
cy.wait(["@bulk-approval", "@real-time-update"]);
|
||||
cy.wait("@bulk-approval");
|
||||
cy.wait(300);
|
||||
cy.get_open_dialog().find(".btn-modal-close").click();
|
||||
cy.reload();
|
||||
|
|
|
|||
|
|
@ -1339,6 +1339,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
return;
|
||||
}
|
||||
|
||||
// if some bulk operation is happening by selecting list items, don't refresh
|
||||
if (this.$checks && this.$checks.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!frappe.get_doc(data?.doctype, data?.name)?.__unsaved) {
|
||||
frappe.model.remove_from_locals(data.doctype, data.name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue