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

[BUG] File List caching ignores page size #2147

Closed
gavinbarron opened this issue Mar 22, 2023 · 1 comment · Fixed by #2406
Closed

[BUG] File List caching ignores page size #2147

gavinbarron opened this issue Mar 22, 2023 · 1 comment · Fixed by #2406
Assignees
Labels
bug Something isn't working State: Completed
Milestone

Comments

@gavinbarron
Copy link
Member

Describe the bug
The caching used when loading data for a file-list doesn't consider the case where the page size is increased beyond the size used for the initial load of a given query.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://mgt.dev/?path=/story/components-mgt-file-list--file-list
  2. Edit the component to use a larger page size than the default 10 e.g. <mgt-file-list page-size="20"></mgt-file-list>
  3. Note that when the page loads again there are only 10 items shown

This assumes that you have not loaded additional pages of data into the cache as the caching handles the case where the page size is less than the number of items held in the cache.

Expected behavior
When page size increases beyond the number of items in the cache and there is a cached next link then the first page of data with the new page size is fetched and cached before rendering files.

@gavinbarron gavinbarron added bug Something isn't working Needs: Triage 🔍 labels Mar 22, 2023
@ghost
Copy link

ghost commented Mar 22, 2023

Hello gavinbarron, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@gavinbarron gavinbarron mentioned this issue Mar 22, 2023
6 tasks
@sebastienlevert sebastienlevert added this to the 2023-04 milestone Mar 23, 2023
@musale musale self-assigned this Jun 6, 2023
@ghost ghost added the State: In Review label Jun 6, 2023
@musale musale modified the milestones: 2023-04, 2023-06 Jun 6, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working State: Completed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants