-
Notifications
You must be signed in to change notification settings - Fork 445
How to use Tabletop.fetch() for refreshing data? #113
Comments
plus one! would be very useful. |
Did anyone figure this out? |
you can use setTimeout |
I did in this project. I am currently making a npm package from the current of this repo. |
It appears that Tabletops internal Promise does not return function getSheetData(id) {
return new Promise(function (resolve) {
const options = {
key: id,
callback: (data, tabletop) => resolve({ data, tabletop });,
simpleSheet: true,
};
Tabletop.init(options);
});
} |
Here's a more detailed description of the issue: If a custom This issue is that Promise.resolve only accepts one argument, but the callback function is being So: Tabletops callback API and the Promise API are incompatible. I am willing to fix this issue, but the owner of this repo doesn't seem to be maintaining it anymore. Therefore, I'm providing this as forensic evidence to a future developer struggling with this issue. 🕵️ |
After calling
Tabletop.init(url, callback);
my google drive data is fetched and displayed in a html page.But at some point in the future, I need to reload the same data live, without refreshing the html page.
I presumed I could call
Tabletop.fetch();
to do this but it seems thatTabletop.fetch();
causes a TypeError. Do I need to call init with the url and callback again?The text was updated successfully, but these errors were encountered: