diff --git a/bower.json b/bower.json index 8692b7e..c7740c4 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "strolch-wc-reports", "description": "Strolch WebComponent Reports", - "version": "0.1.3", + "version": "0.1.4", "authors": [ "Robert von Burg" ], diff --git a/strolch-wc-reports.html b/strolch-wc-reports.html index b430f8d..1000523 100644 --- a/strolch-wc-reports.html +++ b/strolch-wc-reports.html @@ -365,10 +365,20 @@ }, onGetReportResponse: function (event) { // get the response - var response = event.detail.response; + var data = event.detail.response.data; + var that = this; + data.sort(function (a, b) { + a = that.localize(a.name); + b = that.localize(b.name); + if (a < b) + return -1; + if (a > b) + return 1; + return 0; + }); // directly set this as the available types - this.set("reports", response.data); + this.set("reports", data); }, onGetFacetResponse: function (event) { // get the response