Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 561e39a

Browse files
committed
Merge pull request #1207 from markewallace/FixPagerTotalCount
Fix pager total count
2 parents b1f2bd5 + 908ab76 commit 561e39a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/dojo2/grid/_Grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ define([ "../../declare", "../../store/AtomStore", "dojo/_base/lang", "dojo/_bas
5050
start : options.start,
5151
end : options.start + items.length,
5252
count : items.length,
53-
totalCount : items.length,
53+
totalCount : totalCount,
5454
response : results.response
5555
};
5656
try {

sdk/com.ibm.sbt.web/src/main/webapp/js/sdk/sbt/store/AtomStore.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define(["../declare","../config","../lang", "../base/core", "../xml", "../xpath"
4747
attributes : core.entryXPath,
4848
namespaces : core.namespaces,
4949
paramSchema: {},
50-
total: new SbtPromise(),
50+
total: null,
5151

5252
/**
5353
* Constructor for the AtomStore promise.
@@ -59,6 +59,7 @@ define(["../declare","../config","../lang", "../base/core", "../xml", "../xpath"
5959
this._options = options;
6060
this._callbacks = [];
6161
this._errbacks = [];
62+
this.total = new SbtPromise();
6263

6364
if (args) {
6465
this.url = args.url;
@@ -83,8 +84,8 @@ define(["../declare","../config","../lang", "../base/core", "../xml", "../xpath"
8384
}
8485

8586
// add the sorting information to the query
86-
if(options.sort && options.sort[0]) {
87-
if(options.sort[0].attribute) {
87+
if (options.sort && options.sort[0]) {
88+
if (options.sort[0].attribute) {
8889
query.sortBy = options.sort[0].attribute;
8990
}
9091

0 commit comments

Comments
 (0)