diff --git a/frappe/public/js/frappe/views/reports/report_view.js b/frappe/public/js/frappe/views/reports/report_view.js index d736af017d..6c51402250 100644 --- a/frappe/public/js/frappe/views/reports/report_view.js +++ b/frappe/public/js/frappe/views/reports/report_view.js @@ -819,7 +819,20 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView { setup_columns() { const hide_columns = ['docstatus']; const fields = this.fields.filter(f => !hide_columns.includes(f[0])); + + // apply previous column width + let column_widths = null; + if (this.columns) { + column_widths = this.get_column_widths(); + } this.columns = fields.map(f => this.build_column(f)).filter(Boolean); + + if (column_widths) { + this.columns = this.columns.map(column => { + column.width = column_widths[column.id] || column.width; + return column; + }); + } } build_column(c) { diff --git a/package.json b/package.json index 6f2a778387..9293d4965d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "cookie": "^0.3.1", "express": "^4.16.2", "fast-deep-equal": "^2.0.1", - "frappe-datatable": "^1.12.1", + "frappe-datatable": "^1.12.2", "frappe-gantt": "^0.1.0", "fuse.js": "^3.2.0", "highlight.js": "^9.12.0", diff --git a/yarn.lock b/yarn.lock index 2ce2084425..00fabe6140 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1727,10 +1727,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -frappe-datatable@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.12.1.tgz#6efe342346025ffeed822e188a05da6c9c9230c9" - integrity sha512-AC2sJDuJOr0nSfT+w7DPZd7zPW7PHGhg9XxdRNlaAYpy45r3owdJVF+R6lCMQRvFvvzmPMht02EOE6cFpkzLKw== +frappe-datatable@^1.12.2: + version "1.12.2" + resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.12.2.tgz#cb7e32defd38426c63278249843baa91dcba79aa" + integrity sha512-e4prKv4klBW9I5iVIesoeJgt4LofzZDfDxP+eqvQN2GZRVs8KYEXgyPhcaH89FfuhIkzVK6kDbMHw+KbGfOJIA== dependencies: hyperlist "^1.0.0-beta" lodash "^4.17.5"