From e42e7ad9bd8371ccc7ce447d3c6a59ec1577a166 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Mon, 11 Sep 2023 14:18:28 +0530 Subject: [PATCH] fix: undefined in search --- packages/nc-gui/assets/nc-icons/lock.svg | 4 ++++ .../nc-gui/components/smartsheet/toolbar/FieldsMenu.vue | 2 +- packages/nc-gui/components/smartsheet/toolbar/LockType.vue | 5 +++-- .../nc-gui/components/smartsheet/toolbar/SearchData.vue | 6 ++++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 packages/nc-gui/assets/nc-icons/lock.svg diff --git a/packages/nc-gui/assets/nc-icons/lock.svg b/packages/nc-gui/assets/nc-icons/lock.svg new file mode 100644 index 0000000000..45946a1cf5 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/lock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue index 4c547974bf..47b92ae161 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue @@ -341,7 +341,7 @@ useMenuCloseOnEsc(open)
-
+
import { ActiveViewInj, LockType, iconMap, inject } from '#imports' import UsersIcon from '~icons/nc-icons/users' +import LockIcon from '~icons/nc-icons/lock' const { type, hideTick } = defineProps<{ hideTick?: boolean; type: LockType }>() @@ -19,7 +20,7 @@ const types = { }, [LockType.Locked]: { title: 'title.lockedView', - icon: iconMap.lock, + icon: LockIcon, subtitle: 'msg.info.lockedView', }, } @@ -34,7 +35,7 @@ const selectedView = inject(ActiveViewInj)
{{ $t(types[type].title) }} -
+
{{ $t(types[type].subtitle) }}
diff --git a/packages/nc-gui/components/smartsheet/toolbar/SearchData.vue b/packages/nc-gui/components/smartsheet/toolbar/SearchData.vue index 498e7eb627..e78254a50e 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/SearchData.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/SearchData.vue @@ -80,6 +80,12 @@ watchDebounced( maxWait: 600, }, ) + +watch(columns, () => { + if (columns.value?.length) { + search.value.field = columns.value[0].value as string + } +})