fix: give prority to user setting on sorting
This commit is contained in:
parent
18b01453cd
commit
01912910c8
1 changed files with 9 additions and 7 deletions
|
|
@ -103,13 +103,15 @@ frappe.ui.SortSelector = class SortSelector {
|
|||
|
||||
var { meta_sort_field, meta_sort_order } = this.get_meta_sort_field();
|
||||
|
||||
if (meta_sort_field) {
|
||||
this.args.sort_by = meta_sort_field;
|
||||
this.args.sort_order = meta_sort_order;
|
||||
} else {
|
||||
// default
|
||||
this.args.sort_by = "creation";
|
||||
this.args.sort_order = "desc";
|
||||
if (!this.args.sort_by) {
|
||||
if (meta_sort_field) {
|
||||
this.args.sort_by = meta_sort_field;
|
||||
this.args.sort_order = meta_sort_order;
|
||||
} else {
|
||||
// default
|
||||
this.args.sort_by = "creation";
|
||||
this.args.sort_order = "desc";
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.args.sort_by_label) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue