diff --git a/holoviews/core/spaces.py b/holoviews/core/spaces.py index af0d6ea43d..33df4b3fea 100644 --- a/holoviews/core/spaces.py +++ b/holoviews/core/spaces.py @@ -1671,8 +1671,11 @@ def inner_fn(outer_vals, *key, **dynkwargs): inner_vals = [(d.name, k) for d, k in inner_dims] return self.select(**dict(outer_vals+inner_vals)).last if inner_kdims or self.streams: - group = self.clone(callback=partial(inner_fn, outer_vals), - kdims=inner_kdims) + callback = Callable(partial(inner_fn, outer_vals), + inputs=[self]) + group = self.clone( + callback=callback, kdims=inner_kdims + ) else: group = inner_fn(outer_vals, ()) groups.append((outer, group)) diff --git a/holoviews/tests/core/testdynamic.py b/holoviews/tests/core/testdynamic.py index 495543a8df..8dfbfa68db 100644 --- a/holoviews/tests/core/testdynamic.py +++ b/holoviews/tests/core/testdynamic.py @@ -332,6 +332,9 @@ def plot_function(mydim, data): self.assertIsInstance(ndlayout[0], DynamicMap) data = np.array([(0, 0, 0), (1, 1, 1), (2, 2, 2)]) buff.send(data) + self.assertIs(ndlayout[0].callback.inputs[0], dmap) + self.assertIs(ndlayout[1].callback.inputs[0], dmap) + self.assertIs(ndlayout[2].callback.inputs[0], dmap) self.assertEqual(ndlayout[0][()], Scatter([(0, 0)])) self.assertEqual(ndlayout[1][()], Scatter([(1, 1)])) self.assertEqual(ndlayout[2][()], Scatter([(2, 2)]))