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
ELEMENTS-1257: fix reset when fetching in page provider display behavior #298
Conversation
View issue in JIRA: ELEMENTS-1257: Fix refresh of paginated nuxeo-data-table after clearing the filters |
⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here |
@@ -598,7 +598,7 @@ export const PageProviderDisplayBehavior = [ | |||
} | |||
} | |||
if (clear || this.items.length !== count) { | |||
this.reset(count); | |||
this.reset(response.pageSize < count ? response.pageSize : count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issue with pagination, but won't if affect when using lazy scrolling? The items list is assumed to have the same size as the results count, and this will change right? I'm assuming people are relying on the paginable
property, and if so, perhaps we could use it conditionally here to change the behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, we could definitely go with a this.paginable && response.pageSize < count
here, since the issue was only reported for paginated use cases.
57a5b4b
to
ffbec0e
Compare
⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here |
ffbec0e
to
f96b953
Compare
⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here |
f96b953
to
3907d5b
Compare
Updated to better accommodate both the paginated and the infinite scrolling use cases. |
⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here |
Fixes the reset to take into account the current page size (if the page size is X, it should not show more than X entries).