mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
@@ -32,7 +32,11 @@ import { getTableSchemaPath } from "@src/utils/table";
|
||||
export const TableSourceFirestore = memo(function TableSourceFirestore() {
|
||||
// Get tableSettings from tableId and tables in projectScope
|
||||
const [tableSettings] = useAtom(tableSettingsAtom, tableScope);
|
||||
const isCollectionGroup = tableSettings?.tableType === "collectionGroup";
|
||||
if (!tableSettings) throw new Error("No table config");
|
||||
if (!tableSettings.collection)
|
||||
throw new Error("Invalid table config: no collection");
|
||||
|
||||
const isCollectionGroup = tableSettings.tableType === "collectionGroup";
|
||||
|
||||
// Get tableSchema and store in tableSchemaAtom.
|
||||
// If it doesn’t exist, initialize columns
|
||||
@@ -63,7 +67,7 @@ export const TableSourceFirestore = memo(function TableSourceFirestore() {
|
||||
useFirestoreCollectionWithAtom(
|
||||
tableRowsDbAtom,
|
||||
tableScope,
|
||||
tableSettings?.collection,
|
||||
tableSettings.collection,
|
||||
{
|
||||
filters,
|
||||
sorts,
|
||||
|
||||
Reference in New Issue
Block a user