feat: added on_tab_change event on form to run logic on tab change

This commit is contained in:
Shariq Ansari 2023-10-30 13:07:25 +05:30
parent 3407a9963e
commit 0e0f38b60d

View file

@ -2039,6 +2039,8 @@ frappe.ui.form.Form = class FrappeForm {
this.active_tab_map = {};
}
this.active_tab_map[this.docname] = tab;
this.script_manager.trigger("on_tab_change");
}
get_active_tab() {
return this.active_tab_map && this.active_tab_map[this.docname];