From 887269d5c1a42be92c5ddc6c6e2aa84870af4c25 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 28 Jan 2023 12:58:26 +0530 Subject: [PATCH 01/22] fix(gui): single select cell related bugs Signed-off-by: Pranav C --- .../nc-gui/components/cell/SingleSelect.vue | 99 ++++++++++--------- packages/nc-gui/composables/useProject.ts | 2 +- 2 files changed, 51 insertions(+), 50 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 149e9764c9..03dc439583 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -192,57 +192,58 @@ const toggleMenu = (e: Event) => { From 1c3629f6e793e27a5a003120cebb99085d1d09f0 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 1 Feb 2023 14:48:56 +0530 Subject: [PATCH 06/22] fix(gui): close options list when if not active or editable Signed-off-by: Pranav C --- .../nc-gui/components/cell/MultiSelect.vue | 124 +++++++++--------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index af4d465b20..52ff038cbc 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -114,13 +114,13 @@ const selectedTitles = computed(() => ? typeof modelValue === 'string' ? isMysql(column.value.base_id) ? modelValue.split(',').sort((a, b) => { - const opa = options.value.find((el) => el.title === a) - const opb = options.value.find((el) => el.title === b) - if (opa && opb) { - return opa.order! - opb.order! - } - return 0 - }) + const opa = options.value.find((el) => el.title === a) + const opb = options.value.find((el) => el.title === b) + if (opa && opb) { + return opa.order! - opb.order! + } + return 0 + }) : modelValue.split(',') : modelValue : [], @@ -233,7 +233,7 @@ async function addIfMissingAndSave() { // Mysql escapes single quotes with backslash so we keep quotes but others have to unescaped if (!isMysql(column.value.base_id)) { - updatedColMeta.cdf = updatedColMeta.cdf.replace(/''/g, "'") + updatedColMeta.cdf = updatedColMeta.cdf.replace(/''/g, '\'') } } @@ -276,32 +276,33 @@ const onTagClick = (e: Event, onClose: Function) => {