Skip to content

[BUG] File List caching ignores page size  #2147

@gavinbarron

Description

@gavinbarron

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions