pn.widgets.FileDownload trigger a function?

Hi all!

Quick question regarding the file download widget, I have it working where it can download my dataframes when I click it, but I also want to it be able to trigger another function. I can’t seem to get this to work. Is there an on_click method for this widget? Or any way to have my function watch for a widget click? I am using a parameterized class.

Thanks!

Nevermind, I ended up finding the answer! Just had to update my panel to the developer version and use the new FileDownload widget updates.

only needed to add
@param.depends(‘file_download._clicks’, watch=True)

above my function call and it downloads the csv and calls the function.

2 Likes