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

Fileselector widget: click on folder doesn't update the file list #1186

Closed
kcpevey opened this issue Mar 24, 2020 · 7 comments · Fixed by #6843
Closed

Fileselector widget: click on folder doesn't update the file list #1186

kcpevey opened this issue Mar 24, 2020 · 7 comments · Fixed by #6843
Labels
type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Mar 24, 2020

ALL software version info

panel 0.9.3

Description of expected behavior and the observed behavior

When navigating the folders in the left hand side of the FileSelector widget, I can double click on a folder. This triggers the displayed directory string to be updated to the folder I just clicked on. However, the file list does not update. To update the file list, I have to click the "down" arrow.

Reading through the docs, it seems this is expected behavior, but it doesn't feel natural to the user. So maybe this is a feature request instead of a bug report? It seems like this is just missing a param.depends that will trigger a file list update when the directory is changed.

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn
pn.extension()

files = pn.widgets.FileSelector('~')
files
@philippjfr
Copy link
Member

There is sadly no way to make this happen otherwise we would have done it when designing the widget. We do not have access to double click events.

@kcpevey
Copy link
Contributor Author

kcpevey commented Mar 25, 2020

Ah, that's true, a single click on the folder will populate the directory string. Anyhow, it seems like you could just put a watcher on the directory string to trigger an update of the file list. Are you avoiding that because if you typed in the directory string it would trigger with every letter typed?

@kcpevey
Copy link
Contributor Author

kcpevey commented Mar 25, 2020

I don't doubt you've thought this through already, I'm just curious :)

@philippjfr
Copy link
Member

Anyhow, it seems like you could just put a watcher on the directory string to trigger an update of the file list

No I'm avoiding this because it would mean you couldn't select folders (I realize the widget is called FileSelector but it also works for directories). It'd also be super easy to do accidentally which would be annoying.

@kcpevey
Copy link
Contributor Author

kcpevey commented Mar 25, 2020

Got it. Thanks!

@kcpevey kcpevey changed the title Fileselector widget: double click doesn't update the file list Fileselector widget: click on folder doesn't update the file list Mar 25, 2020
@philippjfr philippjfr added the type: enhancement Minor feature or improvement to an existing feature label Apr 1, 2020
@ahuang11
Copy link
Contributor

Could the down arrow key be next to the >> buttons. With heavily nested directories, it feels a bit tedious to drag the mouse to the top right of the widget then back to the center left of the widget to select directory

@dwr-psandhu
Copy link

@philippjfr How about allowing the enter/return key instead of click to navigate to the folder ? Is that possible ?

@philippjfr philippjfr added this to the v1.0.0 milestone Mar 16, 2023
@philippjfr philippjfr modified the milestones: v1.0.0, next May 6, 2023
@philippjfr philippjfr modified the milestones: next, v1.4.3 May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants