fix: refresh form section while refreshing the field
If all the fields with in a section has depends_on property and in such case section itself stays hidden as all fields with in it are hidden. Currently when any form field is updated, we are refreshing only the fields but not the sections. So, field refresh is not affecting the form because of section being hidden. Fix is to refresh the sections when ever form fields are refreshed. (cherry picked from commit 20c6e24a9f58a303b36da8cce247d273e6e3582f)
This commit is contained in:
parent
a440286877
commit
f14d9bd3da
1 changed files with 2 additions and 0 deletions
|
|
@ -175,6 +175,7 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
field && ["Link", "Dynamic Link"].includes(field.df.fieldtype) && field.validate && field.validate(value);
|
||||
|
||||
me.layout.refresh_dependency();
|
||||
me.layout.refresh_sections();
|
||||
let object = me.script_manager.trigger(fieldname, doc.doctype, doc.name);
|
||||
return object;
|
||||
}
|
||||
|
|
@ -1078,6 +1079,7 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
if (this.fields_dict[fname] && this.fields_dict[fname].refresh) {
|
||||
this.fields_dict[fname].refresh();
|
||||
this.layout.refresh_dependency();
|
||||
this.layout.refresh_sections();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue