From f93e9a071a6e49dbff516914aa8a4a46e190ac3a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Dec 2023 11:16:33 +0530 Subject: [PATCH 1/2] fix: handle if returned value is not array Signed-off-by: Pranav C --- packages/nc-gui/components/smartsheet/grid/GroupBy.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue index a0ae323584..a06811ecab 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue @@ -140,13 +140,12 @@ const onScroll = (e: Event) => { // a method to parse group key if grouped column type is LTAR or Lookup // in these 2 scenario it will return json array or `___` separated value const parseKey = (group) => { - const key = group.key.toString() + let key = group.key.toString() // parse json array key if it's a lookup or link to another record if ((key && group.column?.uidt === UITypes.Lookup) || group.column?.uidt === UITypes.LinkToAnotherRecord) { try { - const parsedKey = JSON.parse(key) - return parsedKey + key = JSON.parse(key) } catch { // if parsing try to split it by `___` (for sqlite) return key.split('___') From fdd2e939522d2b49e1fb69b8890d6e35b6e7259a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Dec 2023 12:02:37 +0530 Subject: [PATCH 2/2] fix: skip setting default value for LTAR/Links and other virtual columns Signed-off-by: Pranav C --- .../components/smartsheet/grid/GroupByTable.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/grid/GroupByTable.vue b/packages/nc-gui/components/smartsheet/grid/GroupByTable.vue index a19d1224a0..0a0a72a788 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupByTable.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupByTable.vue @@ -1,4 +1,6 @@