Commit 5e8434ac by François C.

Merge branch '1494-sort-by' into 'dev_cooperatic'

1494  function sort by last choice added

See merge request !95
parents 993f9584 c31c5d18
Pipeline #1661 passed with stage
in 1 minute 31 seconds
...@@ -1478,7 +1478,7 @@ function display_products(params) { ...@@ -1478,7 +1478,7 @@ function display_products(params) {
const data = prepare_datatable_data(); const data = prepare_datatable_data();
const columns = prepare_datatable_columns(); const columns = prepare_datatable_columns();
let sort_order_dir = "asc"; let sort_order_dir = "desc";
if (params != undefined && typeof params.sort_order_dir != "undefined") { if (params != undefined && typeof params.sort_order_dir != "undefined") {
sort_order_dir = params.sort_order_dir; sort_order_dir = params.sort_order_dir;
...@@ -1488,10 +1488,11 @@ function display_products(params) { ...@@ -1488,10 +1488,11 @@ function display_products(params) {
columns: columns, columns: columns,
order: [ order: [
[ [
6, // Order by default by first supplier 5, // Order by default by first supplier
sort_order_dir sort_order_dir
] ]
], ],
stateSave: true,
orderClasses: false, orderClasses: false,
aLengthMenu: [ aLengthMenu: [
[ [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment