Skip to content

Conversation

@JosueBock
Copy link

@JosueBock JosueBock commented Apr 29, 2025

  1. Allow the select_default property to be assigned in a 2 steps process:
    fc=FileChooser(path="...", filename="...")
    fc.select_default=True
    So far, that was not possible (no err message, but no update of the property).

  2. Fix the interaction, by allowing the observe method on "value".
    Sample code (jupyter) showing the change of behaviour:

from ipyfilechooser import FileChooser
import ipywidgets as widgets
from ipywidgets import interact

fc = FileChooser('/home')

def f(x):
    return x

interact(f, x=fc)

Allow the select_default property to be set in a 2 steps process:
    fc=FileChooser(path="...", filename="...")
    fc.select_default=True
So far, that was not possible (no err message, but no update of the property).
@JosueBock JosueBock changed the title Fix select_default property Fix select_default property assignment Apr 29, 2025
The interact method (part of ipywidgets) is not working, because the "observe" method is not implemented.
By changing "value" attribute from a property of the class, into a Unicode HasTraits object, this allows ipyfilechooser to work with interactive methods.
@JosueBock JosueBock changed the title Fix select_default property assignment Fix select_default property assignment and interaction May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant