You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the _get_model on each class calls _link_params, _link_object and _link_objects method which link the parameters to bokeh properties. Apart from having to keep track of a bunch of different watchers and cleaning them up all the time this also means that the watcher isn't registered until model creation which may be after a user defines a watch callback. This leads to issues like described in intake/intake#286, where a user defined callback changes the MultiSelect options before the initial value change event has been propagated to the bokeh model.
Instead we could define a single watcher on instance creation which iterates over all self._models instances and updates them appropriately. I think this approach will be much cleaner overall and ensure that internal panel events take precedence. The longer term approach may be to give param watchers precedences so they can be ordered independently of when they were defined.
The text was updated successfully, but these errors were encountered:
philippjfr
changed the title
Rewrite watch callbacks to allow instantiation in constructor
Instantiate callbacks linking parameters to bokeh properties on instantiation
Mar 9, 2019
philippjfr
changed the title
Instantiate callbacks linking parameters to bokeh properties on instantiation
Instantiate callbacks linking parameters to bokeh properties on Reactive instantiation
Mar 9, 2019
Currently the
_get_model
on each class calls_link_params
,_link_object
and_link_objects
method which link the parameters to bokeh properties. Apart from having to keep track of a bunch of different watchers and cleaning them up all the time this also means that the watcher isn't registered until model creation which may be after a user defines a watch callback. This leads to issues like described in intake/intake#286, where a user defined callback changes the MultiSelect options before the initial value change event has been propagated to the bokeh model.Instead we could define a single watcher on instance creation which iterates over all
self._models
instances and updates them appropriately. I think this approach will be much cleaner overall and ensure that internal panel events take precedence. The longer term approach may be to give param watchers precedences so they can be ordered independently of when they were defined.The text was updated successfully, but these errors were encountered: