From 3b37b7432e969e6315ebd6ed74905ec3980a049c Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 18 Feb 2021 18:12:36 +0100 Subject: [PATCH] fix: disabled sort for fields without a name property --- src/renderer/components/WorkspaceQueryTable.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/WorkspaceQueryTable.vue b/src/renderer/components/WorkspaceQueryTable.vue index 22df3ad9..95a463be 100644 --- a/src/renderer/components/WorkspaceQueryTable.vue +++ b/src/renderer/components/WorkspaceQueryTable.vue @@ -41,7 +41,7 @@ /> {{ field.alias || field.name }} @@ -124,6 +124,9 @@ export default { primaryField () { return this.fields.filter(field => ['pri', 'uni'].includes(field.key))[0] || false; }, + idSortable () { + return this.fields.every(field => field.name); + }, isHardSort () { return this.mode === 'table' && this.localResults.length === 1000; }, @@ -328,6 +331,8 @@ export default { this.isContext = true; }, sort (field) { + if (!this.idSortable) return; + if (this.mode === 'query') field = `${this.getTable(this.resultsetIndex)}.${field}`;