Browse Source

Merge pull request #3708 from nocodb/fix/3702-reload-issue

Fix: Random blank screen bug
pull/3720/head
Pranav C 2 years ago committed by GitHub
parent
commit
bec9eaed7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 16
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -381,7 +381,7 @@ onBeforeUnmount(async () => {
<template>
<div class="flex flex-col h-full min-h-0 w-full">
<general-overlay :model-value="isLoading" inline transition>
<general-overlay :model-value="isLoading" inline transition class="!bg-opacity-15">
<div class="flex items-center justify-center h-full w-full">
<a-spin size="large" />
</div>

16
packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue

@ -1,10 +1,10 @@
<script setup lang="ts">
import type { TabItem } from '~/composables'
import { TabMetaInj } from '#imports'
import { TabMetaInj, until } from '#imports'
const { getMeta } = useMetas()
const { project, projectLoadedHook } = useProject()
const { tables } = useProject()
const route = useRoute()
@ -15,14 +15,12 @@ const activeTab = inject(
computed(() => ({} as TabItem)),
)
if (!project.value.id) {
projectLoadedHook(async () => {
await getMeta(route.params.title as string, true)
loading.value = false
/** wait until table list loads since meta load requires table list **/
until(tables)
.toMatch((tables) => tables.length > 0)
.then(() => {
getMeta(route.params.title as string, true).finally(() => (loading.value = false))
})
} else {
getMeta(route.params.title as string, true).finally(() => (loading.value = false))
}
</script>
<template>

Loading…
Cancel
Save