From 1a731a13d620a2d3be77d4244ac2332b003381ec Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 5 Nov 2024 14:29:38 +0100 Subject: [PATCH] Allow initializing NamedListPanel title dict as parameter --- panel/layout/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panel/layout/base.py b/panel/layout/base.py index d58286db4c..2e0f4ec7e7 100644 --- a/panel/layout/base.py +++ b/panel/layout/base.py @@ -564,8 +564,9 @@ def __init__(self, *items: list[Any | tuple[str, Any]], **params: Any): 'as positional arguments or as a keyword, not both.' ) items = params.pop('objects') - params['objects'], self._names = self._to_objects_and_names(items) + params['objects'], names = self._to_objects_and_names(items) super().__init__(**params) + self._names = names self._panels = defaultdict(dict) self.param.watch(self._update_names, 'objects') # ALERT: Ensure that name update happens first, should be