-
Notifications
You must be signed in to change notification settings - Fork 326
mgt-file-list component should have filterFiles property to be able to use a custom filter #2874
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
Comments
Thanks for your suggestion! We'd love to work with you on this request. Right now, the 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! |
@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. |
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! |
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! |
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. |
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
mgt-file-list
should support both filtering by file extensions but also return folders #1749Preferred 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.
The text was updated successfully, but these errors were encountered: