changeset df93b95db792 in sao:5.4
details: https://hg.tryton.org/sao?cmd=changeset;node=df93b95db792
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
        (grafted from f3d0a8d2b7f71355e67906d096b04d707970a7bc)
diffstat:

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

diffs (11 lines):

diff -r 9fb28c8f479d -r df93b95db792 src/view/tree.js
--- a/src/view/tree.js  Sat Oct 03 00:36:11 2020 +0200
+++ b/src/view/tree.js  Tue Sep 22 10:18:39 2020 +0200
@@ -274,6 +274,7 @@
             if (order && (order.length == 1)) {
                 name = order[0][0];
                 direction = order[0][1];
+                direction = direction.trim().split(' ', 1)[0];
                 icon = {
                     'ASC': 'tryton-arrow-down',
                     'DESC': 'tryton-arrow-up',

Reply via email to