Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Pagination on Admin UI for some backend providers #1582

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

mackcheesman
Copy link
Contributor

@mackcheesman mackcheesman commented Feb 10, 2025

The Admin UI uses a pseudo-cursor for pagination, and to avoid duplicate records that would appear when something gets created or deleted if paging with limit/offset, it instead uses comparison with the last record on the last page to get the next page.

We discovered that this doesn't work as expected for some providers, because they don't support comparing string ID fields. This PR adds a flag to BackendProviderConfig for if comparison is supported or not by the provider (false by default). This is set true for all the built-in MikroORM providers. The Admin UI queries for this flag and changes how it paginates accordingly.

@mackcheesman mackcheesman changed the title Fix/providers without pagination Fix: Pagination on Admin UI for some backend providers Feb 10, 2025
@mackcheesman mackcheesman merged commit 271f9f4 into main Feb 10, 2025
14 checks passed
@mackcheesman mackcheesman deleted the fix/providers-without-pagination branch February 10, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants