Skip to content

Commit

Permalink
Removed form loading of default list data
Browse files Browse the repository at this point in the history
  • Loading branch information
szul committed Mar 27, 2018
1 parent a8bf6ab commit c925844
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 c925844

Please sign in to comment.