pnp / sp-dev-fx-controls-react

Reusable React controls for SPFx solutions
https://pnp.github.io/sp-dev-fx-controls-react/
MIT License
382 stars 379 forks source link

FilePicker: Single- or Mutltiselection Flag #1161

Open kpfeuffer opened 2 years ago

kpfeuffer commented 2 years ago

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

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.

patrick-rodgers commented 2 years ago

Did you mean to submit this to the controls repo?

Edit: I can move the issue, just want to confirm my understanding. Thanks!

kpfeuffer commented 2 years ago

Yes, please move this.

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

aaclage commented 2 years ago

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/

kpfeuffer commented 2 years ago

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.

joelfmrodrigues commented 2 years ago

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

image

kpfeuffer commented 2 years ago

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.

joelfmrodrigues commented 2 years ago

@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 ☺️

ekapic commented 2 years ago

I can tackle this one.

pratapraman commented 5 months ago

Hi, any update on this ticket