However the following popup appears ’ A Cyclic dependency error has been encountered on the current page, queries on page load will not run. Please check debugger and Appsmith documentation for more information.’
Appears to fail due to this section in the docs: {{queryName.data[queryName.data.length - 1]}}
Any ideas? Has anyone managed to get Firestore pagination working?
Introduce a JsObject into your workflow. The JsObject will only be doing 2 things which are:
1a. Store the value of the last entry in the table in the Appsmith store
1b. Run your query each time the store value is updated.
Update your query to use the value stored in the Appsmith store as the cursor for the StartsAfter field.
Update the onPageChange property of your Table widget to run the JsObject created in step 1.
You can check the images below as reference for each step
I have made the changes and it still does not work properly.
Now I do not see the ‘Cyclic Dependency Error’.
I DO see the first page of data results appear in the table - GOOD.
However when I click on the pagination button to go to the next table page. I.E. Page 2 of data results.
The table does not appear and I get the following information:
An error occurred: Cannot call whereEqualTo() after defining a boundary with startAt(), startAfter(), endBefore() or endAt().
I see… Just to be sure the fix works for you, can you try it without the "where " clause and “order by” clause as well. This is just to see if the fix provided earlier works for you.
Regarding the PR, the issue has not been totally fixed yet.
I’ll let you know when this has been fixed. Also, you can just keep an eye on the issue for reference on your end as well. Thank you!