You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2019/07/11 09:09:00 UTC

[atlas] branch master updated: ATLAS-3328 UI : Sort issue after changing the per page results.

This is an automated email from the ASF dual-hosted git repository.

kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new d59c0d0  ATLAS-3328 UI : Sort issue after changing the per page results.
d59c0d0 is described below

commit d59c0d08fbc1f815608807d8dc76dbf8c8b3372d
Author: gutkaBinit <bi...@gmail.com>
AuthorDate: Wed Jul 10 17:26:44 2019 +0530

    ATLAS-3328 UI : Sort issue after changing the per page results.
    
    Signed-off-by: kevalbhatt <kb...@apache.org>
---
 dashboardv2/public/js/utils/TableLayout.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dashboardv2/public/js/utils/TableLayout.js b/dashboardv2/public/js/utils/TableLayout.js
index d8b52af..4077864 100644
--- a/dashboardv2/public/js/utils/TableLayout.js
+++ b/dashboardv2/public/js/utils/TableLayout.js
@@ -189,13 +189,10 @@ define(['require',
                 if (this.includeAtlasTableSorting) {
                     var oldSortingRef = this.collection.setSorting;
                     this.collection.setSorting = function() {
+                        this.state.pageSize = this.length
                         var val = oldSortingRef.apply(this, arguments);
-                        // console.log(val)
                         val.fullCollection.models.sort();
                         this.comparator = function(next, previous, data) {
-
-
-                            // return a.get('year');
                             var getValue = function(options) {
 
                                 var next = options.next,
@@ -209,7 +206,6 @@ define(['require',
                                 }
                             }
                             if (val.state && (!_.isNull(val.state.sortKey))) {
-
                                 var nextValue,
                                     previousValue;
                                 if ((next && next.get("attributes") && next.get("attributes")[val.state.sortKey]) || (previous && previous.get("attributes") && previous.get("attributes")[val.state.sortKey])) {
@@ -228,13 +224,11 @@ define(['require',
                                 });
                             }
                         }
-
                         return val;
                     };
                 }
                 this.bindEvents();
             },
-
             /** all events binding here */
             bindEvents: function() {
                 this.listenTo(this.collection, 'request', function() {