fix(List): save checked rows on auto refresh

This commit is contained in:
prssanna 2019-11-13 11:48:20 +05:30
parent d7773207d7
commit a7fb0dba57

View file

@ -1077,10 +1077,20 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
});
this.toggle_result_area();
this.render_list();
if (this.$checks.length) {
this.set_rows_as_checked();
}
});
});
}
set_rows_as_checked() {
$.each(this.$checks, (i, el) => {
let docname = $(el).attr('data-name');
this.$result.find(`.list-row-checkbox[data-name='${docname}']`).click();
});
}
on_row_checked() {
this.$list_head_subject = this.$list_head_subject || this.$result.find('header .list-header-subject');
this.$checkbox_actions = this.$checkbox_actions || this.$result.find('header .checkbox-actions');