So, once again, referring to the proposed solution: I have a similarly structured app, but without the long calculation. Hence I would like continuous updates. But simply changing
@param.depends('update')
into
@param.depends('max_value')
doesn’t seem to cut it. Although the Update button still works, no automatic plotting happens if I change the number. What am I missing here?
I believe that adding watch=True will trigger the callback (the method decorated with @param.depends(...) everytime one of the listed parameters change. If your callback doesn’t return anything (it just does something like self.someparam = new_value), it’s a good hint for you to add watch=True to the decorator.
Yes indeed, how about it? Thanks a lot, that was the solution!
@philippjfr Maybe the fact that watch=True is needed whenever the decorated method does not return anything should be stated directly in the documentation. From the GoogleMapViewer example in https://panel.holoviz.org/user_guide/Param.html I assumed the watch ensured that the change to self.param['country'] triggers the view() method, which depends on country.
Yes, this is a recurring source of confusion for users if you can find a way to make the difference much clearer in the docs by submitting a PR that would be hugely appreciated. If you don’t have the bandwidth please just open an issue.