소스 검색

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 20c6e24a9f)
version-14
leela 4 년 전
committed by mergify-bot
부모
커밋
f14d9bd3da
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      frappe/public/js/frappe/form/form.js

+ 2
- 0
frappe/public/js/frappe/form/form.js 파일 보기

@@ -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();
}
}



불러오는 중...
취소
저장