Changes in datatable options (#6199)
This commit is contained in:
parent
d3a7399d9e
commit
4ce789d1f5
3 changed files with 13 additions and 6 deletions
|
|
@ -327,17 +327,24 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
|
||||
render_datatable() {
|
||||
if (this.datatable) {
|
||||
this.datatable.options.treeView = this.tree_report;
|
||||
this.datatable.refresh(this.data, this.columns);
|
||||
return;
|
||||
}
|
||||
|
||||
this.datatable = new DataTable(this.$report[0], {
|
||||
let datatable_options = {
|
||||
columns: this.columns,
|
||||
data: this.data,
|
||||
inlineFilters: true,
|
||||
treeView: this.tree_report,
|
||||
layout: 'fixed'
|
||||
});
|
||||
};
|
||||
|
||||
if (this.report_settings.get_datatable_options) {
|
||||
datatable_options = this.report_settings.get_datatable_options(datatable_options);
|
||||
}
|
||||
|
||||
this.datatable = new DataTable(this.$report[0], datatable_options);
|
||||
}
|
||||
|
||||
get_chart_options(data) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"awesomplete": "^1.1.2",
|
||||
"cookie": "^0.3.1",
|
||||
"express": "^4.16.2",
|
||||
"frappe-datatable": "^1.2.0",
|
||||
"frappe-datatable": "^1.3.2",
|
||||
"frappe-gantt": "^0.1.0",
|
||||
"fuse.js": "^3.2.0",
|
||||
"highlight.js": "^9.12.0",
|
||||
|
|
|
|||
|
|
@ -1046,9 +1046,9 @@ forwarded@~0.1.2:
|
|||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
|
||||
frappe-datatable@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.2.0.tgz#d715eeb009c13a15f5e1b8aebc305284497c19e3"
|
||||
frappe-datatable@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.3.2.tgz#0c4a5cb3e169962dc6b05f023b97b817006590a8"
|
||||
dependencies:
|
||||
clusterize.js "^0.18.0"
|
||||
lodash "^4.17.5"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue