From 330af1c4b0eba519c9a7374900899db925b9b13e Mon Sep 17 00:00:00 2001 From: Daniel Spaude Date: Fri, 18 Nov 2022 19:35:34 +0300 Subject: [PATCH] qr code: fix 'ignore qr codes in filter dropdown' --- .../toolbar/FieldListAutoCompleteDropdown.vue | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue b/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue index 8011660884..4438508e65 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue @@ -21,16 +21,17 @@ const localValue = computed({ const options = computed(() => meta.value?.columns ?.filter((c: ColumnType) => { - /** ignore hasmany and manytomany relations if it's using within sort menu */ - if (isSort) { + if (c.uidt === UITypes.QrCode) { + return false + } else if (isSort) { + /** ignore hasmany and manytomany relations if it's using within sort menu */ return !( c.uidt === UITypes.LinkToAnotherRecord && (c.colOptions as LinkToAnotherRecordType).type !== RelationTypes.BELONGS_TO ) /** ignore virtual fields which are system fields ( mm relation ) and qr code fields */ } else { - const isQrCode = c.uidt === UITypes.QrCode const isVirtualSystemField = c.colOptions && c.system - return !isVirtualSystemField && !isQrCode + return !isVirtualSystemField } }) .map((c: ColumnType) => ({ @@ -50,14 +51,9 @@ const filterOption = (input: string, option: any) => option.label.toLowerCase()?