From 3e1c8a00335e8bc906088228e4b84ce27387d35e Mon Sep 17 00:00:00 2001 From: rishipurwar1 Date: Sat, 17 Jun 2023 10:13:27 +0530 Subject: [PATCH] Implement auto import for array subtables --- src/components/Table/EmptyTable.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/Table/EmptyTable.tsx b/src/components/Table/EmptyTable.tsx index 2fb06875..5b96220d 100644 --- a/src/components/Table/EmptyTable.tsx +++ b/src/components/Table/EmptyTable.tsx @@ -33,7 +33,7 @@ export default function EmptyTable() { : false; let contents = <>; - if (tableSettings.isCollection !== false && hasData) { + if (hasData) { contents = ( <>
@@ -41,9 +41,15 @@ export default function EmptyTable() { Get started - There is existing data in the Firestore collection: + {tableSettings.isCollection === false + ? "There is existing data in the Array Sub Table:" + : "There is existing data in the Firestore collection:"}
- {tableSettings.collection} + + {tableSettings.collection} + {tableSettings.subTableKey?.length && + `.${tableSettings.subTableKey}`} +