Merge pull request #22646 from barredterra/fix-column-formatting
fix: list view formatting logic
This commit is contained in:
commit
5ec9ed09a9
1 changed files with 11 additions and 8 deletions
|
|
@ -845,15 +845,18 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
frappe.model.is_numeric_field(df) ? "text-right" : "",
|
||||
].join(" ");
|
||||
|
||||
const html_map = {
|
||||
Subject: this.get_subject_html(doc),
|
||||
Field: field_html(),
|
||||
};
|
||||
let column_html = html_map[col.type];
|
||||
|
||||
// listview_setting formatter
|
||||
if (this.settings.formatters && this.settings.formatters[fieldname]) {
|
||||
let column_html;
|
||||
if (
|
||||
this.settings.formatters &&
|
||||
this.settings.formatters[fieldname] &&
|
||||
col.type !== "Subject"
|
||||
) {
|
||||
column_html = this.settings.formatters[fieldname](value, df, doc);
|
||||
} else {
|
||||
column_html = {
|
||||
Subject: this.get_subject_html(doc),
|
||||
Field: field_html(),
|
||||
}[col.type];
|
||||
}
|
||||
|
||||
return `
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue