diff --git a/lumen/ui/base.py b/lumen/ui/base.py index ad3f480d..a5fcc51e 100644 --- a/lumen/ui/base.py +++ b/lumen/ui/base.py @@ -2,6 +2,7 @@ import param # type: ignore from panel.reactive import ReactiveHTML +from panel.viewable import Viewable from .fast import FastDivider @@ -89,6 +90,10 @@ def _next(self, event=None): self.next_disable = True self.loading = False + def select(self, selector=None): + items = super().select(selector) + items += [o for v in self.items if isinstance(v, Viewable) for o in v.select(selector)] + return items class WizardItem(ReactiveHTML): @@ -113,3 +118,13 @@ def __init__(self, **params): def _update_spec(self, *events): pass + + def select(self, selector=None): + items = super().select(selector) + for values in self.param.objects().values(): + if isinstance(values, (list, dict)): + values = values.values() if isinstance(values, dict) else values + items += [o for v in values if isinstance(v, Viewable) for o in v.select(selector)] + elif isinstance(values, Viewable): + items += values.select(selector) + return items diff --git a/lumen/ui/dashboard.py b/lumen/ui/dashboard.py index 7eecb61f..c69ae301 100644 --- a/lumen/ui/dashboard.py +++ b/lumen/ui/dashboard.py @@ -51,11 +51,11 @@ class DashboardGallery(WizardItem, Gallery):