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

SDG (with Apex sdgIDataProvider) receives the wrong page number when changing filters or page size #68

Open
the-last-byte opened this issue Apr 19, 2022 · 0 comments

Comments

@the-last-byte
Copy link

This issue affects SDGs created using an Apex (sdgIDataProvider) based data provider.

Issue
When the user changes a filter or the page size, the page number resets to 1 on the client-side. However, the getData method of the custom data provider still receives a SDGRequest with the old page number (PageID) - making it impossible to know the correct query limits to apply.

Potential Fix
Reset the page index in the Aura component after a filter has changed and after the page size has been changed. Make sure the reset page number is sent to the server.

Workaround
A workaround involves using the sortablegrid__sdg_Preferences__c to record EVERY query. Add a new field to the object to handle the last page size queried.

If the filters/page size differs from the preferences saved on the last request, assume the page number is 1.

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

No branches or pull requests

1 participant