Browse Source

fix(nc-gui): hide table or base it is blank

pull/7820/head
Ramesh Mane 10 months ago
parent
commit
178668348f
  1. 16
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue

16
packages/nc-gui/components/dashboard/TreeView/TableNode.vue

@ -138,6 +138,22 @@ watch(
const isTableOpened = computed(() => {
return openedTableId.value === table.value?.id && (activeView.value?.is_default || !activeViewTitleOrId.value)
})
const baseTimeout = ref()
watch(openedTableId, () => {
if (table.value.id !== openedTableId.value && isExpanded.value) {
if (baseTimeout.value) {
clearTimeout(baseTimeout.value)
}
baseTimeout.value = setTimeout(() => {
if (isExpanded.value) {
isExpanded.value = false
}
clearTimeout(baseTimeout.value)
}, 5000)
}
})
</script>
<template>

Loading…
Cancel
Save