From d785a69dcf79442b45d37a756827807a6d0eb709 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:58:59 +0530 Subject: [PATCH] Nc fix(nc-gui): restore changes old pr (#8660) * fix(nc-gui): update field modal column type search by it displayed name instead of UITypes * fix(nc-gui): select type default value update issue if we create new column * fix(nc-gui): refactor select type default value update code * fix(nc-gui): allow search column type by it's type as well as display text --- .../components/smartsheet/column/EditOrAdd.vue | 8 ++++++++ .../components/smartsheet/column/SelectOptions.vue | 12 +++++++++--- .../smartsheet/column/UITypesOptionsWithSearch.vue | 7 ++++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue index f8bafd4960..d14242268c 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -283,6 +283,13 @@ const submitBtnLabel = computed(() => { loadingLabel: `${isEdit.value && !props.columnLabel ? t('general.updating') : t('general.saving')} ${columnLabel.value}`, } }) + +const filterOption = (input: string, option: { value: UITypes }) => { + return ( + option.value.toLowerCase().includes(input.toLowerCase()) || + (UITypesName[option.value] && UITypesName[option.value].toLowerCase().includes(input.toLowerCase())) + ) +}