Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantiate callbacks linking parameters to bokeh properties on Reactive instantiation #292

Closed
philippjfr opened this issue Mar 9, 2019 · 0 comments

Comments

@philippjfr
Copy link
Member

philippjfr commented 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.

@philippjfr 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant