Skip to content
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

Allow selecting only directories from a data-url\file widget #4451

Open
1 task done
TheOneTheOnlyJJ opened this issue Jan 15, 2025 · 1 comment
Open
1 task done
Labels
awaiting response feature Is a feature request

Comments

@TheOneTheOnlyJJ
Copy link

Prerequisites

What theme are you using?

core

Is your feature request related to a problem? Please describe.

I want a data-url widget that allows users to select only directories.
I have not found any way to do it as of now.

Describe the solution you'd like

A new widget or UI Schema prop should be added that allows the user to select a directory instead of a file (or more).
This may have to wait until showDirectoryPicker becomes Baseline Newly Available.

Describe alternatives you've considered

I haven't come up with any alternative to this.
The input element does not seem like it accepts selecting directories in any way as of now.

@TheOneTheOnlyJJ TheOneTheOnlyJJ added feature Is a feature request needs triage Initial label given, to be assigned correct labels and assigned labels Jan 15, 2025
@TheOneTheOnlyJJ TheOneTheOnlyJJ changed the title Allow selecting only directories from a data-url widget Allow selecting only directories from a data-url/file widget Jan 15, 2025
@TheOneTheOnlyJJ TheOneTheOnlyJJ changed the title Allow selecting only directories from a data-url/file widget Allow selecting only directories from a data-url\file widget Jan 15, 2025
@nickgros
Copy link
Contributor

@TheOneTheOnlyJJ Could you do this with a custom FileWidget override, assuming you only target browsers that support showDirectoryPicker?

@nickgros nickgros added awaiting response and removed needs triage Initial label given, to be assigned correct labels and assigned labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response feature Is a feature request
Projects
None yet
Development

No branches or pull requests

2 participants