From 522fca634473d8afb7b989be8510da13e1a99029 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 23 Nov 2020 10:19:11 -0700 Subject: [PATCH] Etemplate: Apply sort order (to UI) if server sends it --- api/js/etemplate/et2_extension_nextmatch_controller.js | 3 +++ api/js/etemplate/et2_extension_nextmatch_controller.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index b6ea69e54f..619aabd794 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -519,6 +519,9 @@ var et2_nextmatch_controller = /** @class */ (function (_super) { nm.getParent().getArrayMgr('sel_options').data[id] = _response.rows.sel_options[id]; } } + else if (i === "order") { + nm.sortBy(_response.rows[i], undefined, false); + } else { var mgr = nm.getArrayMgr('content'); mgr.data[i] = _response.rows[i]; diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.ts b/api/js/etemplate/et2_extension_nextmatch_controller.ts index 33080a4fe1..fef3435db8 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.ts +++ b/api/js/etemplate/et2_extension_nextmatch_controller.ts @@ -636,6 +636,10 @@ export class et2_nextmatch_controller extends et2_dataview_controller implements nm.getParent().getArrayMgr('sel_options').data[id] = _response.rows.sel_options[id]; } } + else if (i === "order") + { + nm.sortBy(_response.rows[i], undefined, false); + } else { var mgr = nm.getArrayMgr('content');