
I’m using the FileInput model to upload a file.
After uploading a file, I click the “choose file” button again and click “cancel” in the file explorer dialog.
After doing so, the file name of the previous file I’ve uploaded disappears and instead I see “No file chosen”.
I tried to set a callback that is triggered on any change of the filename property but this callback isn’t being invoked (I tried the same for the “value” property as well). It seems like the properties of the FileInput instance stay the same yet the “No file chosen” message appears.
Here’s a MWE:
from bokeh.models.widgets.inputs import FileInput
from bokeh.io import curdoc
# File input.
file_input = FileInput()
# Run each time the "filename" property is changed.
def on_change(attr, old, new):
print(old, new)
file_input.on_change("filename", on_change)
curdoc().add_root(file_input)
Is that a known bug?


