Open jorgenherje opened 2 years ago
NOTES from https://github.com/equinor/webviz-core-components/issues/221
I have registered two problems with the label of SelectWithLabel
:
style={"display": "none"}
, then the component is hidden, but the label is still there.I would assume this is an example of same issue reported in https://github.com/equinor/webviz-core-components/issues/193
The component from dash-core-components
( dcc
) is placed within a html.Div
together with a html.Label
, but the **kwargs
are only passed to the Select
component. Thus all styling will only affect the Select
and not the html.Label
.
Similar issues yield for other wrapped dcc
components
Style argument does not work properly for wrapped components.
dcc (dash-core-components) are wrapped and placed in
webviz_core_components/wrapped_components
-folder. For wrapped components with label argument, thehtml.Label
is first child inchildren
list, and the wrapped component is appended afterwards. Thestyle
argument does not handle styling properly, as they seem to be appended to the wrapped component only.Example: For wrapped
wcc.RadioItems
thehtml.Label
is added if provided, and thereafter thedcc.RadioItems
is added tochildrens
list. Ifstyle={"margin-top": "10px", "margin-bottom": "10px"}
is provided, themargin-top
setting is applied on thedcc.RadioItems
, which introduce spacing between label and radio items.ISSUE: Spacing between label and RadioItems:
WANTED: Spacing above label and below RadioItems: