From 84fb8299bc695378d585d6c0be49de4b15ab966e Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:09:39 +0530 Subject: [PATCH] Nc fix/select type default value update issue if option is new (#8638) * 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 e2876d7bad..c272eb8cbb 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -269,6 +269,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())) + ) +}