Unplanned
Last Updated: 04 Oct 2024 09:34 by ADMIN
Fabien
Created on: 13 Mar 2024 08:54
Category: FileManager
Type: Feature Request
3
Support for single selection

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?

3 comments
ADMIN
Nadezhda Tacheva
Posted on: 04 Oct 2024 09:34

Hi Fabien,

We were additionally evaluating this request and I am stepping in to provide an update.

We can expose a single selection option and this is what the current item will track. The ability to prevent the user from selecting a file, however, is a matter of custom configuration. For example, in the Windows file selector, the user is generally able to select a file so they can replace it with a new one.

Once the single selection is available, you can control the selection - for example, do not update the selected item if the user tries to select a file.

Having the above in mind, I updated the title of the request to more clearly indicate its purpose.

Regards,
Nadezhda Tacheva
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

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