From cf031ab12ba5171eada60581eb00f70435cf810f Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 5 Sep 2022 14:36:08 +0530 Subject: [PATCH] fix/Fixed scroll issue with EditOrAdd component --- .../smartsheet-column/EditOrAdd.vue | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue b/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue index 77df6bac23..8548d6136c 100644 --- a/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue +++ b/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue @@ -20,8 +20,6 @@ const advancedOptions = ref(false) const { getMeta } = useMetas() -const editOrAddRef = ref() - const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] const onlyNameUpdateOnEditColumns = [UITypes.LinkToAnotherRecord, UITypes.Lookup, UITypes.Rollup] @@ -79,28 +77,10 @@ onMounted(() => { formState.value.column_name = formState.value?.title } }) - -const handleClose = (e: MouseEvent) => { - const target = e.target as HTMLElement - - if ( - target && - editOrAddRef?.value && - !editOrAddRef.value.contains(target) && - !target.closest('.ant-dropdown') && - !target.closest('.ant-select') && - !target.closest('.ant-select-item') - ) { - emit('cancel') - } -} - -useEventListener(document, 'click', handleClose)