Open Jhsmit opened 4 years ago
Thanks I could reproduce that!
With auto=False
the widget acts first as a button (till it's clicked for the first time) and then always as a link (allowing right click to save as) that is indeed not being updated, which is why it always downloads the same data (even if the data contained by the widget on the python side is being updated).
I don't know how difficult it would be to fix that but for sure it's not that simple to support all the different cases well (embed, auto, callbacks, etc.). Would you like to support this case @philippjfr ?
I think we probably should yes or warn if you provide a callback with auto=False
.
Any chance this is going to get worked on? It would be really nice to have download buttons that you just "click" and they download an updated file based on the latest run of the callback, without transforming themselves into a clickable link. I poked around a bit in the file_download.ts file to see if this is an easy change, but it seems overly complex because the one download button needs to support a whole bunch of different behaviors?
ALL software version info
Firefox browser python 3.7
Description of expected behavior and the observed behavior
When using the
FileDownload
widget, the specified callback should return a different payload depending on the value of the dependent parameters. This works whenauto=True
but not withauto=False
Complete, minimal, self-contained example code that reproduces the issue