Merge pull request #12108 from nextchamp-saqib/grid-loop-fix

fix: grid infinte loop while evaluating depends on
This commit is contained in:
mergify[bot] 2021-01-08 06:26:43 +00:00 committed by GitHub
commit c78cb051d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -1271,7 +1271,10 @@ frappe.ui.form.Form = class FrappeForm {
}
if (df && df[property] != value) {
df[property] = value;
this.refresh_field(fieldname);
if (!docname || !table_field) {
// do not refresh childtable fields since `this.fields_dict` doesn't have child table fields
this.refresh_field(fieldname);
}
}
}

View file

@ -510,6 +510,8 @@ frappe.ui.form.Layout = Class.extend({
if (form_obj) {
if (this.doc && this.doc.parent) {
form_obj.set_df_property(this.doc.parentfield, property, value, this.doc.parent, fieldname);
// refresh child fields
this.fields_dict[fieldname] && this.fields_dict[fieldname].refresh();
} else {
form_obj.set_df_property(fieldname, property, value);
}