Hello all,
I've been developing a vite-react app that utilizes flexmonster and in this app I'm able to save the data from the table as a josn to my app's Firestore. But I'm having an inssue importing the same data back into the flexmonster's table. here's the function for it:
// ================== Function to Fetch from Firestore
const fetchTableData = async () => {
const docRef = doc(
db,
"userID-001",
"views",
"viewID-001",
"page-table-001"
);
try {
const docSnap = await getDoc(docRef);
if (docSnap.exists()) {
console.log("Table data fetched:", docSnap.data());
setTableData(docSnap.data().data);
} else {
console.log("No such document!");
}
} catch (error) {
console.error("Error fetching table data:", error);
}
};
please note that I see the data coming in the console log but nothing is showing up in the table itself! I appreciate the help.
Hello Youssef,
Thank you for reaching out to us.
We recommend using Flexmonster API to connect to the data source. Please check the following guide for more details: https://www.flexmonster.com/doc/json-data-source/
One thing to keep in mind is that JSON data should be specified in one of the following formats:
Feel free to check the following section for the examples: https://www.flexmonster.com/doc/json-data-source/#prerequisites
Could you please specify how you pass the data to Flexmonster? Also, are there any errors or messages in the browser's developer console? It would greatly help us.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Thanks you for your help Nadia! The issue was solved!
Hello Youssef,
Thank you for the feedback!
We are glad to hear that it works for you.
Feel free to reach out to us in case other questions arise.
Kind regards,
Nadia