Przeglądaj źródła

Merge pull request #13286 from miguelvazq/HPCC-23169

HPCC-23169 Items in list box is not consistent

Reviewed-By: Gordon Smith <gordon.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 lat temu
rodzic
commit
534c00b2fd

+ 1 - 1
esp/src/eclwatch/DFUQueryWidget.js

@@ -586,7 +586,7 @@ define([
                 var context = this;
                 this.listStore = this.params.searchResults ? this.params.searchResults : new ESPLogicalFile.CreateLFQueryStore();
                 this.treeStore = new ESPLogicalFile.CreateLFQueryTreeStore();
-                this.workunitsGrid = new declare([ESPUtil.Grid(true, true)])({
+                this.workunitsGrid = new declare([ESPUtil.Grid(true, true, false, false, "DFUQueryWidget")])({
                     deselectOnRefresh: true,
                     store: this.listStore,
                     query: this.getFilter(),

+ 1 - 1
esp/src/eclwatch/GetDFUWorkunitsWidget.js

@@ -369,7 +369,7 @@ define([
             initWorkunitsGrid: function () {
                 var context = this;
                 var store = this.params.searchResults ? this.params.searchResults : new ESPDFUWorkunit.CreateWUQueryStore();
-                this.workunitsGrid = new declare([ESPUtil.Grid(true, true)])({
+                this.workunitsGrid = new declare([ESPUtil.Grid(true, true, false, false, "GetDFUWorkunitsWidget")])({
                     store: store,
                     query: this.filter.toObject(),
                     columns: {

+ 1 - 1
esp/src/eclwatch/QuerySetQueryWidget.js

@@ -326,7 +326,7 @@ define([
             initQuerySetGrid: function (params) {
                 var context = this;
                 var store = this.params.searchResults ? this.params.searchResults : ESPQuery.CreateQueryStore();
-                this.querySetGrid = new declare([ESPUtil.Grid(true, true)])({
+                this.querySetGrid = new declare([ESPUtil.Grid(true, true, false, false, "QuerySetQueryWidget")])({
                     store: store,
                     query: this.getGridQuery(),
                     sort: [{ attribute: "Id" }],

+ 1 - 1
esp/src/eclwatch/WUQueryWidget.js

@@ -445,7 +445,7 @@ define([
             initWorkunitsGrid: function () {
                 var context = this;
                 this.store = this.params.searchResults ? this.params.searchResults : new ESPWorkunit.CreateWUQueryStore();
-                this.workunitsGrid = new declare([ESPUtil.Grid(true, true)])({
+                this.workunitsGrid = new declare([ESPUtil.Grid(true, true, false, false, "WUQueryWidget")])({
                     store: this.store,
                     query: this.getFilter(),
                     columns: {

+ 4 - 2
esp/src/src/ESPUtil.ts

@@ -429,13 +429,15 @@ export class UndefinedMemory extends UndefinedMemoryBase {
     }
 }
 
-export function Grid(pagination?, selection?, overrides?, compoundColumns?) {
+export function Grid(pagination?, selection?, overrides?, compoundColumns?, gridName?) {
     var baseClass = [];
     var params = {};
+    var rows =  Number(localStorage.getItem(gridName))
+
     if (pagination) {
         baseClass = [DGrid, Pagination, ColumnResizer, Keyboard, DijitRegistry, CompoundColumns];
         lang.mixin(params, {
-            rowsPerPage: 50,
+            rowsPerPage: rows || 50,
             pagingLinks: 1,
             pagingTextBox: true,
             firstLastArrows: true,