sp-dev-fx-controls-react
sp-dev-fx-controls-react copied to clipboard
FilePicker: Single- or Mutltiselection Flag
Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the Docs to see if your question is already addressed there. This will help us ensure our documentation covers the most frequent questions.
Category
- [x] Enhancement
- [ ] Bug
- [ ] Question
- [ ] Documentation gap/issue
Version
Please specify what version of the library you are using: [ 3.6.0 ]
Please specify what version(s) of SharePoint you are targeting: [ SPO ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
It would be great, if the Filepicker would allow to switch between single- and multi-selection. We currently need it for a project, where you can only pick a single image.
Did you mean to submit this to the controls repo?
Edit: I can move the issue, just want to confirm my understanding. Thanks!
Yes, please move this.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi @kpfeuffer
FilePicker control allow pick one or more files, the same for uploading. https://pnp.github.io/sp-dev-fx-controls-react/controls/FilePicker/
Im aware of this, but it would be great if we could disable multi-selection. We are using it in a context, where multiple files make no sense and want to prevent confusing the users.
Hi @kpfeuffer I think I understand the suggestion.
You should be able to hide the multi-upload tab by using the hideLocalMultipleUploadTab
property. This property is available, but seems to be missing from documentation.
I just updated docs so should be published with the next release.
Let us know if this does not solve your problem
Hi,
this was more in reference to the recent, your org, stock images, and website-tabs as well. These seem to still allow for multiple picks when the hideLocalMultipleUploadTab
option is set to true.
@kpfeuffer I understand your need now. Unfortunately, the control does not currently have a property where we can specify the max number of files to be selected. If you would be interested in implementing this change, please let us know ☺️
I can tackle this one.
Hi, any update on this ticket