fix: in mobile view on click base it auto navigate to members page

This commit is contained in:
Ramesh Mane
2026-01-30 11:11:59 +00:00
parent 530c0f0b83
commit f62540bd29
4 changed files with 4 additions and 37 deletions

View File

@@ -9,8 +9,6 @@ const { setLeftSidebarSize } = useGlobal()
const configStore = useConfigStore()
const { handleSidebarOpenOnMobileForNonViews } = configStore
const { isMobileMode } = storeToRefs(configStore)
const slots = useSlots()
@@ -179,10 +177,6 @@ watch(sidebarState, () => {
}
})
onMounted(() => {
handleSidebarOpenOnMobileForNonViews()
})
function onResize(widthPercent: any) {
if (isMobileMode.value) return

View File

@@ -22,9 +22,6 @@ const { ncNavigateTo } = useGlobal()
const route = useRoute()
const { handleSidebarOpenOnMobileForNonViews } = useConfigStore()
const { activeTableId } = storeToRefs(useTablesStore())
const { activeProjectId } = storeToRefs(useBases())
const { activeWorkspaceId } = storeToRefs(useWorkspace())
@@ -184,10 +181,6 @@ const onDrop = async (event: DragEvent) => {
}
}
watch([activeViewTitleOrId, activeTableId], () => {
handleSidebarOpenOnMobileForNonViews()
})
const { leftSidebarWidth, windowSize, isFullScreen } = storeToRefs(useSidebarStore())
const { isPanelExpanded, extensionPanelSize } = useExtensions()

View File

@@ -7,12 +7,6 @@ export const useConfigStore = defineStore('configStore', () => {
const { isMobileMode: globalIsMobile } = useGlobal()
const { width } = useWindowSize()
const sidebarStore = useSidebarStore()
const viewsStore = useViewsStore()
const { activeViewTitleOrId } = storeToRefs(viewsStore)
const tablesStore = useTablesStore()
const { activeTableId } = storeToRefs(tablesStore)
const isViewPortMobile = () => width.value < MAX_WIDTH_FOR_MOBILE_MODE
// When set to true expanded form will auto focus on comment input and state will be set to false after focussing
@@ -53,26 +47,9 @@ export const useConfigStore = defineStore('configStore', () => {
},
)
const handleSidebarOpenOnMobileForNonViews = () => {
if (!isViewPortMobile()) return
if (!activeViewTitleOrId && !activeTableId) {
nextTick(() => {
sidebarStore.isLeftSidebarOpen = true
})
} else {
sidebarStore.isLeftSidebarOpen = false
}
}
watch([activeViewTitleOrId, activeTableId], () => {
handleSidebarOpenOnMobileForNonViews()
})
return {
isMobileMode,
isViewPortMobile,
handleSidebarOpenOnMobileForNonViews,
projectPageTab,
isExpandedFormCommentMode,
hideSharedBaseBtn,

View File

@@ -20,6 +20,9 @@ export const useSidebarStore = defineStore('sidebarStore', () => {
const tablesStore = useTablesStore()
const viewsStore = useViewsStore()
const { activeViewTitleOrId } = storeToRefs(viewsStore)
const allowHideLeftSidebarForCurrentRoute = computed(() => {
return ['index-typeOrId-baseId-index-index', 'index-typeOrId-settings'].includes(route.name as string)
})
@@ -30,7 +33,7 @@ export const useSidebarStore = defineStore('sidebarStore', () => {
return _isLeftSidebarOpen.value
}
return (isMobileMode.value && !tablesStore.activeTableId) || _isLeftSidebarOpen.value
return (isMobileMode.value && !activeViewTitleOrId.value) || _isLeftSidebarOpen.value
},
set(value) {
_isLeftSidebarOpen.value = value