From af9cdb5ada977a1e573a5a1b4e954b990fe5b893 Mon Sep 17 00:00:00 2001 From: Dhruv Balwada Date: Sat, 27 Mar 2021 06:59:17 -0700 Subject: [PATCH] Expand description of watch=True in Param.ipynb (#2120) --- examples/user_guide/Param.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/user_guide/Param.ipynb b/examples/user_guide/Param.ipynb index 7ba730e27f..6475c0e04d 100644 --- a/examples/user_guide/Param.ipynb +++ b/examples/user_guide/Param.ipynb @@ -360,7 +360,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Whenever the continent changes it will now eagerly execute the ``_update_countries`` method to change the list of countries that is displayed, which in turn triggers an update in the view method updating the map." + "Whenever the continent changes Param will now eagerly execute the ``_update_countries`` method to change the list of countries that is displayed, which in turn triggers an update in the view method updating the map. Note that there is no need to add ``watch=True`` to decorators of methods that are passed to a Panel layout (e.g. ``viewer.View`` being passed to ``pn.Row`` here), because Panel will already handle dependencies on those methods, executing the method automatically when the dependent parameters change. Indeed, if you specify ``watch=True`` for such a method, the method will get invoked _twice_ each time a dependency changes (once by Param internally and once by Panel), so you should reserve ``watch=True`` only for methods that aren't otherwise being monitored for dependencies." ] }, {