diff --git a/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue b/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue index df777a869e..a70edb7d0c 100644 --- a/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue +++ b/packages/nc-gui/components/dashboard/TreeView/CreateViewBtn.vue @@ -2,8 +2,15 @@ import type { ViewType } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk' +const props = defineProps<{ + // Prop used to align the dropdown to the left in sidebar + alignLeftLevel: number | undefined +}>() + const { $e } = useNuxtApp() +const alignLeftLevel = toRef(props, 'alignLeftLevel') + const { refreshCommandPalette } = useCommandPalette() const viewsStore = useViewsStore() const { loadViews, navigateToView } = viewsStore @@ -16,6 +23,14 @@ const toBeCreateType = ref() const isOpen = ref(false) +const overlayClassName = computed(() => { + if (alignLeftLevel.value === 1) return 'nc-view-create-dropdown nc-view-create-dropdown-left-1' + + if (alignLeftLevel.value === 2) return 'nc-view-create-dropdown nc-view-create-dropdown-left-2' + + return 'nc-view-create-dropdown' +}) + async function onOpenModal({ title = '', type, @@ -84,7 +99,7 @@ async function onOpenModal({