changeset f3d0a8d2b7f7 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=f3d0a8d2b7f7
description:
        Set correct direction arrow from order with NULLS extra parameter

        Arrows direction icons in treeview are defined by ASC or DESC keywords. 
When
        using an order with composed sentence eg. "DESC NULLS FIRST", we need to
        extract first word to get arrow direction keyword.

        issue9587
        review296211002
diffstat:

 src/view/tree.js |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 72f9f93fc00e -r f3d0a8d2b7f7 src/view/tree.js
--- a/src/view/tree.js  Fri Sep 18 00:07:58 2020 +0200
+++ b/src/view/tree.js  Tue Sep 22 10:18:39 2020 +0200
@@ -326,6 +326,7 @@
                 name = order[0][0];
                 direction = order[0][1];
                 if (direction) {
+                    direction = direction.trim().split(' ', 1)[0];
                     icon = {
                         'ASC': 'tryton-arrow-down',
                         'DESC': 'tryton-arrow-up',

Reply via email to