Giter Site home page Giter Site logo

Comments (3)

tcbegley avatar tcbegley commented on June 12, 2024

Hi @stdedos

Apologies that it took me a long time to get back to you.

It should be possible to pass components in version 1.4.0 and later. So 1.3.1 will not work, though I see you had problems with 1.5.0 also?

I wasn't exactly sure what the A, B, and C are in your example, but I tried the below and had no problems

import dash_bootstrap_components as dbc
from dash import Dash, html

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

app.layout = dbc.Container(
    [
        dbc.Checklist(
            options=[
                {
                    "label": html.Span(
                        f"Option {i}",
                        style={"color": "red" if i % 2 == 0 else "blue"},
                    ),
                    "value": i,
                }
                for i in range(1, 11)
            ],
        ),
    ],
    className="p-5",
)


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

Could you try this example with dbc>=1.4.0 and let me know if it works for you?

from dash-bootstrap-components.

Nizhurin avatar Nizhurin commented on June 12, 2024

in version dash_bootsrap_component = 1.4.0 and 1.5.0. i get this error

Minified React error #31
In the minified production build of React, we avoid sending down full error messages in order to reduce the number of bytes sent over the wire.

We highly recommend using the development build locally when debugging your app since it tracks additional debug info and provides helpful warnings about potential problems in your apps, but if you encounter an exception while using the production build, this page will reassemble the original error message.

The full text of the error you just encountered is:

Objects are not valid as a React child (found: object with keys {namespace, props, type}). If you meant to render a collection of children, use an array instead.

my code is:

        dbc.Checklist(
            options=[
                {"label": html.Span('Test_label_check_with_icons', style={'class': "bi bi-sun"}), "value": 777}
            ],
            id="checklist-with-icons",
        ),

dash version 2.0.0 may be anyone help me with checklist with icons ?

from dash-bootstrap-components.

AnnMarieW avatar AnnMarieW commented on June 12, 2024

Hi @Nizhurin Try upgrading to the latest version of Dash. That feature wasn't available in Dash V2.0.0

from dash-bootstrap-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.