dash-bootstrap-components icon indicating copy to clipboard operation
dash-bootstrap-components copied to clipboard

[BUG] dbc.Modal(style) is passed to fade-modal-show layer instead modal

Open luggie opened this issue 2 months ago • 3 comments

dash                      2.16.1
dash_ag_grid              31.0.1
dash-bootstrap-components 1.6.0
dash-bootstrap-templates  1.1.2
dash-core-components      2.0.0
dash-html-components      2.0.0
dash-split                0.0.4
dash-table                5.0.0
dash-testing-stub         0.0.2

Expected behavior in test app: Modal should appear according to style parameters.

from dash import Dash, html
import dash_bootstrap_components as dbc

app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])

app.layout = html.Div([
    dbc.Modal(
        [
            dbc.ModalHeader("Header"),
            dbc.ModalBody("This is the content of the modal"),
            dbc.ModalFooter(
                dbc.Button("Close", id="close", className="ml-auto")
            ),
        ],
        id="modal",
        is_open=True,
        style={
            "position": "absolute",
            "top": "10px",
            "left": "10px",
        }
    )
])


if __name__ == '__main__':
    app.run_server(debug=True)

Instead, the style parameters are passed to the fade-modal-show layer:

Screenshot from 2024-04-23 10-36-29

Is this intended? If so, why?

luggie avatar Apr 23 '24 17:04 luggie