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

ELEMENTS-1257: fix reset when fetching in page provider display behavior #298

Closed
wants to merge 1 commit into from

Conversation

mnixo
Copy link
Member

@mnixo mnixo commented Oct 19, 2020

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).

@mnixo mnixo requested a review from a team as a code owner October 19, 2020 14:48
@nuxeojenkins
Copy link
Contributor

View issue in JIRA: ELEMENTS-1257: Fix refresh of paginated nuxeo-data-table after clearing the filters

richardsd
richardsd previously approved these changes Oct 19, 2020
@nuxeo-web-ui-jx-bot
Copy link
Contributor

⭐ 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);
Copy link
Collaborator

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?

Copy link
Member Author

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.

@nuxeo-web-ui-jx-bot
Copy link
Contributor

⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here

semisse
semisse previously approved these changes Oct 22, 2020
@nuxeo-web-ui-jx-bot
Copy link
Contributor

⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here

Gabez0r
Gabez0r previously approved these changes Oct 23, 2020
@mnixo
Copy link
Member Author

mnixo commented Oct 26, 2020

Updated to better accommodate both the paginated and the infinite scrolling use cases.

@mnixo mnixo requested review from semisse and Gabez0r October 26, 2020 16:21
@nuxeo-web-ui-jx-bot
Copy link
Contributor

⭐ PR built and available in a preview environment nuxeo-nuxeo-elements-pr-298 here

@mnixo mnixo closed this Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants