Under Review
Last Updated: 28 Mar 2024 12:07 by ADMIN
Fabien
Created on: 13 Mar 2024 08:54
Category: FileManager
Type: Feature Request
1
Control FileManager selection count (single or multiple) and type (file, folder or both?)

Greetings.

I was using the FileManager recently and wanted to make sure the user could only select a single file. I was expecting a parameter to configure that but I didn't find any. I was able to bypass the issue by acting on the value reported by the component but I found it a bit inconvenient.

I think it might be interesting if we could:

  • choose if we select one or several elements (single vs multiple selection, like with grids)
  • choose what element we can select (files & folders, files only, folders only)

What do you think?

2 comments
Fabien
Posted on: 21 Mar 2024 14:08

Hello Svetoslav,

In my case, I use the FileManager component in a dialog to create something similar to the Windows file selector (but in-browser). GUI consists in a text box containing the file path and a "..." button to select a file/folder. This will all be wrapped in a component that will be used by other developers so it is important that its interface is minimalist and simple.

In my case, there are business cases where it's important to select a single file (e.g. selecting one file to open (e.g. a video to play), or selecting one folder to store something in (e.g. a folder where all backup archives will be saved)). Single file selection is what I chose to implement since my component will be used to choose a storage folder.

The inconvenience I faced in this context is that I couldn't directly transfer the FileManager's selection outside of my wrapper. First, the IEnumerable<MyFileClass> is inconvenient/illogical to use in my case, and secondly, the user must not be able to select several folders (since we want to choose only one) so being able to select several things will be confusing (e.g. if two folders are selected, which one will store the data?). Thirdly, I don't want the user to be able to select a file since you cannot store files in a file (seeing a selected file will also be confusing).

I bypassed the issue by reading only the first file of the selection in my component and sending it outside to the parent in a MyFileClass parameter. If my file tree doesn't only contain folders (keeping files visible might help the user to know where he is?), I will also need to manually filter out anything that is not a folder.

Regards

ADMIN
Svetoslav Dimitrov
Posted on: 20 Mar 2024 08:55

Hello Fabien,

I can see that you found a way to achieve the desired behavior with the current API of the FileManager. Can you share a bit more information on what inconveniences did you face while developing the functionality?

We are also curious to find out the user story behind being able to select only one file.

Regards,
Svetoslav Dimitrov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!d