crahan / ipyfilechooser

Python file chooser widget for use in Jupyter/IPython in conjunction with ipywidgets
MIT License
103 stars 19 forks source link

Take into account the `select_default` parameter when resetting an existing FileChooser object #32

Closed crahan closed 3 years ago

crahan commented 3 years ago

Currently the reset() function ignores the select_default parameter and always resets to a state where no selection has been made.

CptofMySoul commented 3 years ago

Thanks for creating this and considering this need.

To add a little color, here's my use case. I have a program for styling charts in Jupyter from an input data file, and then saving those as .svg. I have two ipyfilechooser widgets— one for the data file and one for the output .svg. I want the selected output filename to default to using the base of the data file chosen. That's why I want to change the selected file after creation. It needs to change in the output widget after the data file selection has happened in the input one.