소스 검색

fix: Recursive routing for Form route (#15539)

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
version-14
Pruthvi Patel 3 년 전
committed by GitHub
부모
커밋
53d4ddca43
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. +4
    -3
      frappe/public/js/frappe/router.js
  2. +1
    -0
      frappe/public/js/frappe/views/formview.js

+ 4
- 3
frappe/public/js/frappe/router.js 파일 보기

@@ -282,7 +282,7 @@ frappe.router = {
resolve();
});
}, 100);
});
}).finally(() => frappe.route_flags = {});
},

get_route_from_arguments(route) {
@@ -374,8 +374,9 @@ frappe.router = {
// change the URL and call the router
if (window.location.pathname !== url) {

// push state so the browser looks fine
history.pushState(null, null, url);
// push/replace state so the browser looks fine
const method = frappe.route_flags.replace_route ? "replaceState" : "pushState";
history[method](null, null, url);

// now process the route
this.route();


+ 1
- 0
frappe/public/js/frappe/views/formview.js 파일 보기

@@ -98,6 +98,7 @@ frappe.views.FormFactory = class FormFactory extends frappe.views.Factory {
if (new_name===name) {
this.render(doctype_layout, name);
} else {
frappe.route_flags.replace_route = true;
frappe.set_route("Form", doctype_layout, new_name);
}
}


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