Merge pull request #37797 from iamejaaz/list-view-seperator

fix(mobile): hide seperator when no data
This commit is contained in:
Ejaaz Khan 2026-03-05 23:21:38 +05:30 committed by GitHub
commit 5f4334d9e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -837,9 +837,13 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
let col = this.columns[i];
if (frappe.is_mobile() && col.type == "Field" && [3, 4].includes(i)) {
left_html += `<div class="mobile-layout ${
i == 3 ? "mobile-layout-seperator" : ""
}">${this.get_column_html(col, doc, true)}</div>`;
const no_seperator_class = !doc[col?.df?.fieldname] ? "no-seperator" : "";
left_html += `<div
class="mobile-layout ${no_seperator_class} ${i == 3 ? "mobile-layout-seperator" : ""}"
${no_seperator_class ? "style='padding-left: var(--margin-sm);'" : ""}
>
${this.get_column_html(col, doc, true)}
</div>`;
} else {
left_html += this.get_column_html(col, doc, false);
}