microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

Filelist component max page size

Open jbk75 opened this issue 2 years ago • 2 comments

Hi, I'm using the microsoft/mgt-react. I'm trying to understand how I can limit the count of items shown in the filelist component.

I set the pagesize = 2 and expect to see only 2 files. But I get the complete list of files.

Here is my code: ` <FileList

siteId="san..." itemId="0..."

itemView={3} pageSize={2}

fileExtensions={fileExt}

itemClick={(e) => { fileHandlerSharepointFiles(e);

} }

</FileList>`

jbk75 avatar May 24 '22 15:05 jbk75

Hello jbk75, 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 🙌

ghost avatar May 24 '22 15:05 ghost

It feels like the issue happens when using the file-extensions property. You can see a repro here : https://stackblitz.com/edit/mgt-issue-1707?file=App.tsx. It traverses the entire content of a folder and filters out the extensions, but without adding them to the UI with the requested page-size. I feel this is a clear bug and we will be adding it to our backlog! Thanks!

sebastienlevert avatar May 24 '22 20:05 sebastienlevert