fix: show correct link titles in report view

This commit is contained in:
Asmita Hase 2025-06-12 17:55:45 +05:30
parent 899a2cfc49
commit a98bb44483

View file

@ -150,6 +150,7 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
if (!this.group_by) {
this.init_chart();
}
this.set_link_title_field_value();
}
@ -159,7 +160,12 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
this.link_title_doctype_fields[key],
key
);
document.querySelector(`a[data-name="${key}"]`).innerHTML = link_title;
if (link_title !== undefined) {
document.querySelectorAll(`a[data-name="${key}"]`).forEach((el) => {
el.innerHTML = link_title;
});
}
});
}