Skip to content

Commit

Permalink
Merge pull request #123 from szul/master
Browse files Browse the repository at this point in the history
Removed form loading of default list data
  • Loading branch information
szul authored Mar 27, 2018
2 parents e298446 + c925844 commit 794c12b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metron",
"version": "2.8.3",
"version": "2.8.4",
"description": "A lightweight library and front-end framework utilizing data attributes",
"main": "dist/gen/metron.js",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metronical.metron",
"version": "2.8.3",
"version": "2.8.4",
"description": "A lightweight library and front-end framework utilizing data attributes",
"main": "dist/gen/metron.js",
"homepage": "https://github.com/metronical/metron",
Expand Down
2 changes: 1 addition & 1 deletion src/metron.forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace metron {
defaults = metron.tools.formatOptions(qs, metron.OptionTypes.QUERYSTRING);
}
if (metron.globals.firstLoad) {
parameters = metron.routing.getRouteUrl();
parameters = metron.routing.getRouteUrl({"PageSize": 1, "PageIndex": 1, "_SortOrder": 1, "_SortDirection": 1}); ///This should send null values or by removed by default.
}
self.loadForm(parameters, defaults);
});
Expand Down
1 change: 1 addition & 0 deletions src/metron.lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ namespace metron {
}
let hash = metron.routing.getRouteUrl(self._filters);
if (hash != null) {
/* If getRouteUrl() has the filters set, then the below items should never be in the hash. Might be able to delete this. */
self.pageSize = (hash["PageSize"] != null) ? hash["PageSize"] : self.pageSize;
self.currentPageIndex = (hash["PageIndex"] != null) ? hash["PageIndex"] : self.currentPageIndex;
self.sortOrder = (hash["_SortOrder"] != null) ? hash["_SortOrder"] : self.sortOrder;
Expand Down
2 changes: 1 addition & 1 deletion src/metron.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace metron {
if (filters != null) {
for (let h in result) {
if (result.hasOwnProperty(h)) {
if (filters[h] != null) {
if (filters[h] != null) { //This should be checking for undefined.
delete result[h];
}
}
Expand Down

0 comments on commit 794c12b

Please sign in to comment.