From the docstring of CollapsiveHeader:
"""Creates a collapsible box with a large header label.
Keyword arguments:
- children (a list of or a singular dash component, string or number; required):
The children of this component.
...
"""
However, if we pass anything other than a list as children argument, we are presented with the error:
***\site-packages\webviz_core_components\wrapped_components\collapsive_header.py", line 27, in __init__
self.children = [
TypeError: can only concatenate list (not "Div") to list
which is caused by not inspecting the children argument before assigning it:
def __init__(
self, children: Any, open_details: bool = True, label: str = "", **kwargs: Any
) -> None:
super().__init__(**kwargs)
self.open = open_details
self.children = [
html.Summary(children=label, className="webviz-header")
] + children
From the docstring of CollapsiveHeader:
However, if we pass anything other than a list as children argument, we are presented with the error:
which is caused by not inspecting the children argument before assigning it: