From 9b29a35dc367685690bcb725148f7dc6ba4670cb Mon Sep 17 00:00:00 2001 From: Janet Vorobyeva Date: Tue, 12 Sep 2023 15:36:25 -0700 Subject: [PATCH] QuerySet:makeQuery bug, added logging Weird behavior: filterlinking calls makeQuery twice in quick succession, but for some reason the calls resolve out of order when starting from a refresh. However, after moving the cursor around a bit, they START BEHAVING CORRECTLY AGAIN??? --- app/client/models/QuerySet.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/client/models/QuerySet.ts b/app/client/models/QuerySet.ts index 269f1583..c4b8275a 100644 --- a/app/client/models/QuerySet.ts +++ b/app/client/models/QuerySet.ts @@ -163,8 +163,11 @@ export class DynamicQuerySet extends RowSource { // CB should be called asynchronously, since surprising hard-to-debug interactions can happen // if it's sometimes synchronous and sometimes not. + console.log(`======= called makeQuery: ${query.tableId}: ${JSON.stringify(query.filters)}`) //TODO JV TEMP DEBUG newQuerySet.fetchPromise.then(() => { + console.log(`======= promise RESOLVED: ${query.tableId}: ${JSON.stringify(query.filters)}`) //TODO JV TEMP DEBUG this._updateQuerySetDebounced(newQuerySet, cb); + }) .catch((err) => { cb(err, false); }); }