Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

mgt-file-list component should have filterFiles property to be able to use a custom filter #2874

Closed

Description

Proposal: Add filterFiles property to mgt-file-list so custom filter function could be provided by consumer

Description

As a consumer of this component i should be able to decide if specific document should be shown or not (currently only file extensions are supported). Using a filter function could solve most scenarios.

Rationale

Preferred Solution

Implement filterFiles property following the filterTasks implementation from to-do component.

Additional Context

Probably I will try to implement it myself any time soon.

Activity

  1. sebastienlevert commented on Nov 23, 2023

    @sebastienlevert
    Collaborator

    Thanks for your suggestion! We'd love to work with you on this request. Right now, the filterTasks on the to-do component does the filtering on the client side, which is OK for tasks as the amount of data is limited, but challenging for a file list. Today, we already support providing one of multiple file queries, but these won't support advanced filtering, and the search endpoints on the drive items is being deprecated, so this doesn't help in the future (https://devblogs.microsoft.com/microsoft365dev/transition-to-microsoft-graph-search-endpoint-for-onedrive-and-sharepoint/).

    That being said, there are valid scenarios and would love your feedback. Is it more of a "search" scenario that could leverage an improved version of our search results component? Would client-side filtering "enough" for this concept? Let's brainstorm!

  2. eduardpaul commented on Nov 23, 2023

    @eduardpaul
    Author

    Sébastien Levert (@sebastienlevert) totally agree with you that client side filtering is not the best option to filter out results and it could be a pain when it comes to paginating results from graph api.

    Our scenario is more about file management where we want to hide specific files (system files) from the end user and allow them to browse through folders and upload files. In SharePoint Online we are handling this by filtering certain content types in the list views. In this case, client-side filtering of file-list will do the trick.

    One thing I'm not sure about is if it makes sense that the file-list component should have the file upload option. For example it generates an inconsistency with the configuration: if you activate upload and configure filequeries you will be showing documents from one place but the upload will be done in your onedrive. And as you pointed out, listing files (read-only scenarios with search, filtering,....) could be covered by a search-result component.

    Probably in the long term it would be better to have a "file-explorer" or "file-manager" component with some basic add/upload, delete, move, copy and paste functionality that you could point to a specific library, folder,. and replace file-list with search result component.

  3. sebastienlevert commented on Nov 23, 2023

    @sebastienlevert
    Collaborator

    To your last point, we have been having a long-standing PR that does exactly what you are mentioning (minus the file filtering). #2564

    It might be useful to look at this branch (very outdated to be honest) and see if this could help with your scenario.

    Now back to the file filter scenario, I think it makes sense for "light" filters, maybe not large complex filters... I think we could document this caveat and I'd agree it deliver some scenarios... We're happy for you to send a PR and we'll happily review and help with the process!

  4. moved this from Needs Triage 🔍 to Proposed 💡 in Graph Toolkiton Jan 30, 2024
  5. sebastienlevert commented on Jan 30, 2024

    @sebastienlevert
    Collaborator

    At the moment, this is not something we're likely to prioritize. That being said, the Graph Toolkit is an open source project and we'll be happy to support and review if you want to contribute to its codebase! Please let us know if you'd be happy to help and implement this capability. If not, it's absolutely fine, we'll go and close the issue and might re-open it later if we reconsider our priorities. Thanks!

  6. microsoft-github-policy-service commented on Feb 3, 2024

    @microsoft-github-policy-service
    Contributor

    This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

  7. moved this from Proposed 💡 to Done ✔️ in Graph Toolkiton Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author Feedbackfeature-requestno-recent-activity

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions