Skip to content

Commit

Permalink
Ensure that events are held while hooks are applied (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 17, 2019
1 parent f3dd893 commit e7f7059
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions panel/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,20 @@ def _update_model(self, events, msg, root, model, doc, comm=None):
if self._rename['objects'] in msg:
old = events['objects'].old
msg[self._rename['objects']] = self._get_objects(model, old, doc, root, comm)

held = doc._hold
if comm is None and not held:
doc.hold()
model.update(**msg)

from .io import state
ref = root.ref['id']
if ref in state._views:
state._views[ref][0]._preprocess(root)

if comm is None and not held:
doc.unhold()

#----------------------------------------------------------------
# Model API
#----------------------------------------------------------------
Expand Down

0 comments on commit e7f7059

Please sign in to comment.