mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fix table flashing with no data
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
tableScope,
|
||||
tableIdAtom,
|
||||
tableSettingsAtom,
|
||||
tableSchemaAtom,
|
||||
} from "@src/atoms/tableScope";
|
||||
|
||||
/**
|
||||
@@ -57,9 +58,18 @@ export default function ProvidedTablePage() {
|
||||
>
|
||||
<DebugAtoms scope={tableScope} />
|
||||
<TableSourceFirestore />
|
||||
<main>
|
||||
<TablePage />
|
||||
</main>
|
||||
<Suspense
|
||||
fallback={
|
||||
<>
|
||||
<TableToolbarSkeleton />
|
||||
<TableSkeleton />
|
||||
</>
|
||||
}
|
||||
>
|
||||
<main>
|
||||
<TablePage />
|
||||
</main>
|
||||
</Suspense>
|
||||
<Suspense fallback={null}>
|
||||
<Outlet />
|
||||
</Suspense>
|
||||
|
||||
@@ -46,6 +46,14 @@ export default function TablePage() {
|
||||
// A ref to the data grid. Contains data grid functions
|
||||
const dataGridRef = useRef<DataGridHandle | null>(null);
|
||||
|
||||
if (!(tableSchema as any)._rowy_ref)
|
||||
return (
|
||||
<>
|
||||
<TableToolbarSkeleton />
|
||||
<TableSkeleton />
|
||||
</>
|
||||
);
|
||||
|
||||
if (isEmpty(tableSchema.columns))
|
||||
return (
|
||||
<Suspense fallback={null}>
|
||||
|
||||
Reference in New Issue
Block a user