Browse Source

fix: render view menu only if view is defined

pull/7405/head
Pranav C 10 months ago
parent
commit
4490919ad6
  1. 8
      packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue

8
packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue

@ -142,7 +142,12 @@ const onDelete = async () => {
</script>
<template>
<NcMenu class="!min-w-70" data-id="toolbar-actions" :data-testid="`view-sidebar-view-actions-${view!.alias || view!.title}`">
<NcMenu
v-if="view"
class="!min-w-70"
data-id="toolbar-actions"
:data-testid="`view-sidebar-view-actions-${view!.alias || view!.title}`"
>
<NcTooltip>
<template #title> {{ $t('labels.clickToCopyViewID') }} </template>
<div class="flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-gray-100 group" @click="onViewIdCopy">
@ -314,6 +319,7 @@ const onDelete = async () => {
/>
</template>
</NcMenu>
<span v-else></span>
</template>
<style lang="scss" scoped>

Loading…
Cancel
Save