dbgate-datalib 5.5.2 → 5.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,11 +185,14 @@ class GridDisplay {
185
185
  applySortOnSelect(select, displayedColumnInfo) {
186
186
  var _a;
187
187
  if (((_a = this.config.sort) === null || _a === void 0 ? void 0 : _a.length) > 0) {
188
- select.orderBy = this.config.sort
188
+ const orderByColumns = this.config.sort
189
189
  .map(col => (Object.assign(Object.assign({}, col), { dispInfo: displayedColumnInfo[col.uniqueName] })))
190
190
  .map(col => (Object.assign(Object.assign({}, col), { expr: select.columns.find(x => x.alias == col.uniqueName) })))
191
191
  .filter(col => col.dispInfo && col.expr)
192
192
  .map(col => (Object.assign(Object.assign({}, col.expr), { direction: col.order })));
193
+ if (orderByColumns.length > 0) {
194
+ select.orderBy = orderByColumns;
195
+ }
193
196
  }
194
197
  }
195
198
  get isGrouped() {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.5.2",
2
+ "version": "5.5.3",
3
3
  "name": "dbgate-datalib",
4
4
  "main": "lib/index.js",
5
5
  "typings": "lib/index.d.ts",
@@ -13,12 +13,12 @@
13
13
  "lib"
14
14
  ],
15
15
  "dependencies": {
16
- "dbgate-sqltree": "^5.5.2",
17
- "dbgate-tools": "^5.5.2",
18
- "dbgate-filterparser": "^5.5.2"
16
+ "dbgate-sqltree": "^5.5.3",
17
+ "dbgate-tools": "^5.5.3",
18
+ "dbgate-filterparser": "^5.5.3"
19
19
  },
20
20
  "devDependencies": {
21
- "dbgate-types": "^5.5.2",
21
+ "dbgate-types": "^5.5.3",
22
22
  "@types/node": "^13.7.0",
23
23
  "jest": "^28.1.3",
24
24
  "ts-jest": "^28.0.7",