Browse Source

fix: Fixed issue with field dropdown

pull/6903/head
Muhammed Mustafa 1 year ago
parent
commit
e79adce2fe
  1. 10
      packages/nc-gui/components/nc/Dropdown.vue
  2. 9
      packages/nc-gui/components/smartsheet/details/Fields.vue

10
packages/nc-gui/components/nc/Dropdown.vue

@ -47,6 +47,14 @@ onClickOutside(overlayWrapperDomRef, () => {
visible.value = false
})
const onVisibleUpdate = (event: any) => {
if (visible !== undefined) {
visible.value = event
} else {
emits('update:visible', event)
}
}
</script>
<template>
@ -54,7 +62,7 @@ onClickOutside(overlayWrapperDomRef, () => {
:visible="visible"
:trigger="trigger"
:overlay-class-name="overlayClassNameComputed"
@update:visible="visible !== undefined ? (visible = $event) : undefined"
@update:visible="onVisibleUpdate"
>
<slot />

9
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -686,13 +686,11 @@ onMounted(async () => {
}
})
watch(isColOptionDropdownOpen, () => {
if (isColOptionDropdownOpen.value === true) return
const onFieldOptionUpdate = () => {
setTimeout(() => {
isFieldIdCopied.value = false
}, 200)
})
}
</script>
<template>
@ -840,9 +838,9 @@ watch(isColOptionDropdownOpen, () => {
</NcButton>
<NcDropdown
v-else
v-model:visible="isColOptionDropdownOpen"
:trigger="['click']"
overlay-class-name="nc-dropdown-table-explorer"
@update:visible="onFieldOptionUpdate"
@click.stop
>
<NcButton
@ -976,6 +974,7 @@ watch(isColOptionDropdownOpen, () => {
v-else
:trigger="['click']"
overlay-class-name="nc-dropdown-table-explorer-display-column"
@update:visible="onFieldOptionUpdate"
@click.stop
>
<NcButton

Loading…
Cancel
Save