[gantt] always sort based on start_date field (#2342)
This commit is contained in:
parent
d100c7f0c5
commit
ff98e29dd9
1 changed files with 10 additions and 0 deletions
|
|
@ -242,6 +242,16 @@ frappe.views.DocListView = frappe.ui.Listing.extend({
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Always sort based on start_date field for Gantt View
|
||||
if(frappe.get_route()[2] === 'Gantt') {
|
||||
var field_map = frappe.views.calendar[this.doctype].field_map;
|
||||
args = {
|
||||
sort_by: field_map.start,
|
||||
sort_order: 'asc'
|
||||
}
|
||||
}
|
||||
|
||||
this.sort_selector = new frappe.ui.SortSelector({
|
||||
parent: this.wrapper.find('.list-filters'),
|
||||
doctype: this.doctype,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue